MATH_CalcSHA1

Syntax

#include <nitro/math/dgt.h>

static inline void MATH_CalcSHA1( void* digest, const void* data, u32 dataLength );

Arguments

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.

Return Values

None.

Description

This function calculates SHA-1. The length of the generated SHA-1 value is 160 bits, or MATH_SHA1_DIGEST_SIZE (= 20) 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_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).

See Also

Revision History

2005/04/12 Initial version.


CONFIDENTIAL