libratbox/crypt: fix difference from glibc in sha256_crypt()
rb_crypt() was generating different SHA256 ($5$) hashes than glibc, making hashes generated with charybdis unusable in ratbox and other software, and vice versa.
This commit is contained in:
parent
cba8bbc3fc
commit
320d34a606
1 changed files with 1 additions and 1 deletions
|
@ -1567,7 +1567,7 @@ static char *rb_sha256_crypt_r(const char *key, const char *salt, char *buffer,
|
|||
rb_sha256_init_ctx(&alt_ctx);
|
||||
|
||||
/* For every character in the password add the entire password. */
|
||||
for (cnt = 0; cnt < (size_t)(16 + alt_result[0]); ++cnt)
|
||||
for (cnt = 0; cnt < key_len; ++cnt)
|
||||
rb_sha256_process_bytes(key, key_len, &alt_ctx);
|
||||
|
||||
/* Finish the digest. */
|
||||
|
|
Loading…
Reference in a new issue