mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-26 18:49:43 +01:00
sha1: Remove unneeded resets
This commit is contained in:
parent
6916554918
commit
0abbde0ebb
@ -46,8 +46,6 @@ static void __hmac_sha1(struct l_checksum *checksum,
|
||||
l_checksum_update(checksum, key, key_len);
|
||||
l_checksum_get_digest(checksum, digest, SHA1_MAC_LEN);
|
||||
|
||||
l_checksum_reset(checksum);
|
||||
|
||||
key = digest;
|
||||
key_len = SHA1_MAC_LEN;
|
||||
}
|
||||
@ -69,15 +67,11 @@ static void __hmac_sha1(struct l_checksum *checksum,
|
||||
l_checksum_update(checksum, data, data_len);
|
||||
l_checksum_get_digest(checksum, digest, SHA1_MAC_LEN);
|
||||
|
||||
l_checksum_reset(checksum);
|
||||
|
||||
/* perform outer SHA1 */
|
||||
l_checksum_update(checksum, opad, sizeof(opad));
|
||||
l_checksum_update(checksum, digest, SHA1_MAC_LEN);
|
||||
l_checksum_get_digest(checksum, output,
|
||||
size > SHA1_MAC_LEN ? SHA1_MAC_LEN : size);
|
||||
|
||||
l_checksum_reset(checksum);
|
||||
}
|
||||
|
||||
bool hmac_sha1(const void *key, size_t key_len,
|
||||
|
Loading…
Reference in New Issue
Block a user