int unitTests() { int errors = testCipherUtils(); errors += testMAC(); errors += doKeyTests(0); errors += testElite(); return errors; }
int unitTests() { int errors = testCipherUtils(); errors += testMAC(); errors += doKeyTests(0); errors += testElite(); errors += testOptMAC(); if(errors) { prnlog("OBS! There were errors!!!"); } return errors; }
static int selfTest( void ) { const CAPABILITY_INFO *capabilityInfo = getHmacSHA2Capability(); BYTE macState[ MAC_STATE_SIZE + 8 ]; int i, status; /* Test HMAC-SHA2 against the test vectors given in RFC 4231 */ for( i = 0; hmacValues[ i ].data != NULL; i++ ) { status = testMAC( capabilityInfo, macState, hmacValues[ i ].key, hmacValues[ i ].keyLength, hmacValues[ i ].data, hmacValues[ i ].length, hmacValues[ i ].digest ); if( cryptStatusError( status ) ) return( status ); } return( CRYPT_OK ); }