Skip to content

Commit

Permalink
crypto: marvell - Use IPAD/OPAD constant
Browse files Browse the repository at this point in the history
This patch simply replace all occurrence of HMAC IPAD/OPAD value by their
define.

Signed-off-by: Corentin Labbe <[email protected]>
Acked-by: Boris Brezillon <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
montjoie authored and herbertx committed May 23, 2017
1 parent bb9634d commit d477d81
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/crypto/marvell/hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* by the Free Software Foundation.
*/

#include <crypto/hmac.h>
#include <crypto/md5.h>
#include <crypto/sha.h>

Expand Down Expand Up @@ -1164,8 +1165,8 @@ static int mv_cesa_ahmac_pad_init(struct ahash_request *req,
memcpy(opad, ipad, blocksize);

for (i = 0; i < blocksize; i++) {
ipad[i] ^= 0x36;
opad[i] ^= 0x5c;
ipad[i] ^= HMAC_IPAD_VALUE;
opad[i] ^= HMAC_OPAD_VALUE;
}

return 0;
Expand Down

0 comments on commit d477d81

Please sign in to comment.