mirror of
https://github.com/cryb-to/cryb-to.git
synced 2024-12-18 18:44:53 +00:00
Correct context length for SHA digests
This commit is contained in:
parent
398abda6b0
commit
bf36ff7a8c
5 changed files with 5 additions and 5 deletions
|
@ -237,7 +237,7 @@ sha1_complete(const void *buf, size_t len, uint8_t *digest)
|
|||
|
||||
digest_algorithm sha1_digest = {
|
||||
.name = "sha1",
|
||||
.contextlen = sizeof sha1_digest,
|
||||
.contextlen = sizeof(sha1_ctx),
|
||||
.blocklen = SHA1_BLOCK_LEN,
|
||||
.digestlen = SHA1_DIGEST_LEN,
|
||||
.init = (digest_init_func)sha1_init,
|
||||
|
|
|
@ -367,7 +367,7 @@ pbkdf2_sha224(const uint8_t * passwd, size_t passwdlen, const uint8_t * salt,
|
|||
|
||||
digest_algorithm sha224_digest = {
|
||||
.name = "sha224",
|
||||
.contextlen = sizeof sha224_digest,
|
||||
.contextlen = sizeof(sha224_ctx),
|
||||
.blocklen = SHA224_BLOCK_LEN,
|
||||
.digestlen = SHA224_DIGEST_LEN,
|
||||
.init = (digest_init_func)sha224_init,
|
||||
|
|
|
@ -367,7 +367,7 @@ pbkdf2_sha256(const uint8_t * passwd, size_t passwdlen, const uint8_t * salt,
|
|||
|
||||
digest_algorithm sha256_digest = {
|
||||
.name = "sha256",
|
||||
.contextlen = sizeof sha256_digest,
|
||||
.contextlen = sizeof(sha256_ctx),
|
||||
.blocklen = SHA256_BLOCK_LEN,
|
||||
.digestlen = SHA256_DIGEST_LEN,
|
||||
.init = (digest_init_func)sha256_init,
|
||||
|
|
|
@ -306,7 +306,7 @@ void sha384_complete( const void *input, int ilen, uint8_t *output )
|
|||
|
||||
digest_algorithm sha384_digest = {
|
||||
.name = "sha384",
|
||||
.contextlen = sizeof sha384_digest,
|
||||
.contextlen = sizeof(sha384_ctx),
|
||||
.blocklen = SHA384_BLOCK_LEN,
|
||||
.digestlen = SHA384_DIGEST_LEN,
|
||||
.init = (digest_init_func)sha384_init,
|
||||
|
|
|
@ -309,7 +309,7 @@ void sha512_complete( const void *input, int ilen, uint8_t *output )
|
|||
|
||||
digest_algorithm sha512_digest = {
|
||||
.name = "sha512",
|
||||
.contextlen = sizeof sha512_digest,
|
||||
.contextlen = sizeof(sha512_ctx),
|
||||
.blocklen = SHA512_BLOCK_LEN,
|
||||
.digestlen = SHA512_DIGEST_LEN,
|
||||
.init = (digest_init_func)sha512_init,
|
||||
|
|
Loading…
Reference in a new issue