Skip to content

Commit a6f58b6

Browse files
committed
include: add sha256 hash API
Signed-off-by: Ajay Bhargav <[email protected]>
1 parent 8df9f21 commit a6f58b6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

include/crypto/sha.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@ extern "C" {
1818
*/
1919
void sha1(const unsigned char *input, int ilen, unsigned char output[20]);
2020

21+
/**
22+
* @brief Calculate sha256 hash
23+
*
24+
* @param input [in] Input data buffer
25+
* @param ilen [in] Input data length
26+
* @param output [out] Output buffer to store hash
27+
*/
28+
void sha256(const unsigned char *input, int ilen, unsigned char output[32]);
29+
2130
#ifdef __cplusplus
2231
}
2332
#endif

0 commit comments

Comments
 (0)