Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/gost12256hash_fmt_plug.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ static int crypt_all(int *pcount, struct db_salt *salt)
/* Start computation of S byte sequence. */
GOST34112012Init(&alt_ctx, 256);

/* For every character in the password add the entire password. */
/* Repeat the following 16+A[0] times, where A[0] represents the
first byte in digest A interpreted as an 8-bit unsigned value */
for (cnt = 0; cnt < 16 + ((unsigned char*)crypt_out[index])[0]; ++cnt)
GOST34112012Update(&alt_ctx, cur_salt->salt, cur_salt->len);

Expand Down
3 changes: 2 additions & 1 deletion src/gost94hash_fmt_plug.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ static int crypt_all(int *pcount, struct db_salt *salt)
/* Start computation of S byte sequence. */
john_gost_init(&alt_ctx);

/* For every character in the password add the entire password. */
/* Repeat the following 16+A[0] times, where A[0] represents the
first byte in digest A interpreted as an 8-bit unsigned value */
for (cnt = 0; cnt < 16 + ((unsigned char*)crypt_out[index])[0]; ++cnt)
john_gost_update(&alt_ctx, cur_salt->salt, cur_salt->len);

Expand Down
3 changes: 2 additions & 1 deletion src/sm3crypt_fmt_plug.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ static int crypt_all(int *pcount, struct db_salt *salt)
/* Start computation of S byte sequence. */
sm3_init(&alt_ctx);

/* For every character in the password add the entire password. */
/* Repeat the following 16+A[0] times, where A[0] represents the
first byte in digest A interpreted as an 8-bit unsigned value */
for (cnt = 0; cnt < 16 + ((unsigned char*)crypt_out[index])[0]; ++cnt)
sm3_update(&alt_ctx, cur_salt->salt, cur_salt->len);

Expand Down