#include <nitro/math/dgt.h>
static inline void MATH_CalcSHA1( void* digest, const void* data, u32 dataLength );
digest | Pointer to the memory location that holds the calculated SHA-1 value. |
data | Pointer to the input data. |
dataLength | Size of the input data. |
None.
This function calculates SHA-1. The length of the generated SHA-1 value is 160 bits, or MATH_SHA1_DIGEST_SIZE (= 20)
This is a utility function that successively calls the MATH_SHA1Init
, MATH_SHA1Update
, and MATH_SHA1GetHash
functions. Internally, the MATHSHA1Context
structure is allocated to the stack, so make sure that you have sufficient stack when calling the function. SHA-1 is an algorithm to find the message digest value. For details, see RFC (Request For Comments) 3174, which is published by IETF (The Internet Engineering Task Force).
2005/04/12 Initial version.
CONFIDENTIAL