From 3fa2d1091446d8253fe4549aedee58dd062f64ab Mon Sep 17 00:00:00 2001
From: jsteube <jens.steube@gmail.com>
Date: Sat, 9 Jul 2016 14:35:38 +0200
Subject: [PATCH] Allow the use of enc_id == 0 in hash-mode 10600 and 10700 as
 it takes no part in the actual computation Fixes
 https://github.com/hashcat/hashcat/issues/423

---
 docs/changes.txt | 1 +
 src/shared.c     | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/docs/changes.txt b/docs/changes.txt
index 2c4818c21..9a3ece19e 100644
--- a/docs/changes.txt
+++ b/docs/changes.txt
@@ -12,6 +12,7 @@
 - Fix some variable initializers on older compilers
 - Replace DARWIN macro with compiler predefined macro __APPLE__
 - Replace LINUX macro with compiler predefined macro __linux__
+- Allow the use of enc_id == 0 in hash-mode 10600 and 10700 as it takes no part in the actual computation
 
 ##
 ## Bugs
diff --git a/src/shared.c b/src/shared.c
index f69312289..5b7faead0 100644
--- a/src/shared.c
+++ b/src/shared.c
@@ -17933,7 +17933,7 @@ int pdf17l8_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf)
 
   int enc_md = atoi (enc_md_pos);
 
-  if (enc_md != 1) return (PARSER_SALT_VALUE);
+  if ((enc_md != 0) && (enc_md != 1)) return (PARSER_SALT_VALUE);
 
   const uint id_len = atoi (id_len_pos);
   const uint u_len  = atoi (u_len_pos);