28 #define MAC_STATE_SIZE sizeof( MAC_STATE )
36 #ifndef CONFIG_NO_SELFTEST
48 {
"", 0, NULL, 0, { 0 } }
51 static int selfTest(
void )
58 for( i = 0; hmacValues[ i ].data != NULL; i++ )
60 status = testMAC( capabilityInfo, macState, hmacValues[ i ].
key,
87 assert( contextInfoPtr == NULL || \
89 assert( ( length == 0 &&
isWritePtr( data,
sizeof(
int ) ) ) || \
90 ( length > 0 &&
isWritePtr( data, length ) ) );
103 return( getDefaultInfo( type, contextInfoPtr, data, length ) );
116 MAC_INFO *macInfo = contextInfoPtr->ctxMAC;
143 memcpy( hashBuffer, macInfo->userKey,
169 MAC_INFO *macInfo = contextInfoPtr->ctxMAC;
193 if( macInfo->userKey != key )
194 memcpy( macInfo->userKey, key, keyLength );
201 memcpy( hashBuffer, macInfo->userKey,
225 selfTest, getInfo, NULL, NULL, initKey, NULL, hash, hash
230 return( &capabilityInfo );