#include <revolution/net.h>
inline void NETCalcSHA256(void* digest, const void* input, u32 length);
| 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. This is a utility function that successively calls the NETSHA256Init, NETSHA256Update, and NETSHA256GetDigest functions.
Any size and alignment position can be used for the input data.
To store the hash length to be generated, be sure to pass a sufficient memory region in the digest argument. Because the context structure is allocated internally, make sure that you have sufficient stack space when calling the function. For details, see the "SHA-256" section of the hash algorithm.
2008/05/07 Initial version.
CONFIDENTIAL