

#include <nitro/math/dgt.h>
static inline void MATH_CalcSHA256( void* digest, const void* data, u32 dataLength );
| digest | Pointer to the memory location that holds the calculated SHA-256 value. |
| data | Pointer to the input data. |
| dataLength | Size of the input data. |
None.
This function calculates SHA-256. The length of the generated SHA-256 value is 256 bits or MATH_SHA256_DIGEST_SIZE (32) bytes. Use the "digest" argument to pass an area that can store a value of this size. Any size and alignment position can be used for the input data.
This is a utility function that successively calls the MATH_SHA256Init, MATH_SHA256Update, and MATH_SHA256GetHash functions. Internally, the MATHSHA256Context structure is allocated to the stack, so make sure that you have sufficient stack when calling the function. SHA-256 is an algorithm to find the message digest value. For details, refer to the Federal Information Processing Standard, FIPS PUB 180-2.
2008/05/23 Initial version.
CONFIDENTIAL