summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPhilippe Reynes <[email protected]>2024-12-19 14:05:50 +0100
committerTom Rini <[email protected]>2025-01-18 17:12:47 -0600
commite364a9148f0adecf32628c16b1571dd729b45358 (patch)
treea218968fa263d5d460a9700a195066c029c0e2df /include
parentccc5e166836c2fa204a58fe9ac87c5fce72b5e7b (diff)
lib: sha256: add feature sha256_hmac
Adds the support of the hmac based on sha256. This implementation is based on rfc2104. Signed-off-by: Philippe Reynes <[email protected]> Reviewed-by: Raymond Mao <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/u-boot/sha256.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/u-boot/sha256.h b/include/u-boot/sha256.h
index 44a9b528b48..99cf78e204c 100644
--- a/include/u-boot/sha256.h
+++ b/include/u-boot/sha256.h
@@ -45,4 +45,8 @@ void sha256_finish(sha256_context * ctx, uint8_t digest[SHA256_SUM_LEN]);
void sha256_csum_wd(const unsigned char *input, unsigned int ilen,
unsigned char *output, unsigned int chunk_sz);
+int sha256_hmac(const unsigned char *key, int keylen,
+ const unsigned char *input, unsigned int ilen,
+ unsigned char *output);
+
#endif /* _SHA256_H */