SVC_CalcHMACSHA1

Syntax

#include <twl/os/common/systemCall.h>
void SVC_CalcHMACSHA1( void* md,
                    const void* data,
                    u32 len,
                    const void* key,
                    u32 keylen );

Arguments

md Pointer to the memory location that holds the calculated SHA-1 value.
data Pointer to the input data.
len Size of the input data.
key Pointer to key text string
keylen Size of the key string.

Return Values

None.

Description

Performs HMAC-SHA1 calculations.

This is a utility function that successively calls the SVC_HMACSHA1Init(), SVC_HMACSHA1Update(), and SVC_HMACSHA1GetHash() functions. Internally, the SVCHMACSHA1Context structure is allocated to the stack, so make sure you have sufficient stack space when calling the function.

The length of the generated SHA-1 value is 160 bits, or SVC_SHA1_DIGEST_SIZE (= 20) bytes. Use the md argument to pass an area that can store a value of this size.

Specify the input data using data and len. Any size and alignment position can be used.

Specify the key string using key and keylen.

See Also

SVC_HMACSHA1Init, SVC_HMACSHA1Update, SVC_HMACSHA1GetHash, SVC_CalcSHA1

Revision History

2007/10/24 Initial version.


CONFIDENTIAL