Mercurial > dropbear
diff libtomcrypt/src/mac/hmac/hmac_init.c @ 1733:d529a52b2f7c coverity coverity
merge coverity from main
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Fri, 26 Jun 2020 21:07:34 +0800 |
parents | 1ff2a1034c52 |
children |
line wrap: on
line diff
--- a/libtomcrypt/src/mac/hmac/hmac_init.c Thu Mar 21 23:28:59 2019 +0800 +++ b/libtomcrypt/src/mac/hmac/hmac_init.c Fri Jun 26 21:07:34 2020 +0800 @@ -20,7 +20,7 @@ /** Initialize an HMAC context. @param hmac The HMAC state - @param hash The index of the hash you want to use + @param hash The index of the hash you want to use @param key The secret key @param keylen The length of the secret key (octets) @return CRYPT_OK if successful @@ -64,9 +64,9 @@ XMEMCPY(hmac->key, key, (size_t)keylen); } - if(keylen < LTC_HMAC_BLOCKSIZE) { - zeromem((hmac->key) + keylen, (size_t)(LTC_HMAC_BLOCKSIZE - keylen)); - } + if(keylen < LTC_HMAC_BLOCKSIZE) { + zeromem((hmac->key) + keylen, (size_t)(LTC_HMAC_BLOCKSIZE - keylen)); + } /* Create the initialization vector for step (3) */ for(i=0; i < LTC_HMAC_BLOCKSIZE; i++) { @@ -89,8 +89,8 @@ #ifdef LTC_CLEAN_STACK zeromem(buf, LTC_HMAC_BLOCKSIZE); #endif - - return err; + + return err; } #endif