SVC_HMACSHA1Init

Syntax

#include <twl/os/common/systemCall.h>
void SVC_HMACSHA1Init( SVCHMACSHA1Context* context,
             const void* key,
             u32 keylen );
typedef struct SVCHMACSHA1Context
{
    SVCSHA1Context  sha1_ctx;
    u8              key[SVC_SHA1_BLOCK_SIZE];
    u32             keylen;
}
SVCHMACSHA1Context

Arguments

context Pointer to the context structure to initialize for HMAC-SHA1 generation.
key Key string.
keylen Length of key string.

Return Values

None.

Description

Initializes the structure to use when calculating HMAC-SHA1. Make sure that this function is called before using the SVC_HMACSHA1Update or SVC_HMACSHA1GetHash functions.

context is the context structure to initialize for HMAC-SHA1 generation. You can reapply this function to a context structure that is already initialized. In this case, it will return the context structure to its initial state.

In key and keylen, specify the key string to provide to HMAC-SHA1. Keys up to SVC_SHA1_BLOCK_SIZE (=64) bytes can be specified.

See Also

SVC_HMACSHA1Update, SVC_HMACSHA1GetHash, SVC_SHA1Init

Revision History

2007/10/24 Initial version.


CONFIDENTIAL