Home | History | Annotate | Download | only in ocb

Lines Matching refs:tests

32    } tests[] = {
178 for (x = 0; x < (int)(sizeof(tests)/sizeof(tests[0])); x++) {
180 if ((err = ocb_encrypt_authenticate_memory(idx, tests[x].key, 16,
181 tests[x].nonce, tests[x].pt, tests[x].ptlen, outct, outtag, &len)) != CRYPT_OK) {
185 if (XMEMCMP(outtag, tests[x].tag, len) || XMEMCMP(outct, tests[x].ct, tests[x].ptlen)) {
189 for (y = 0; y < (unsigned long)tests[x].ptlen; ) {
191 if (y < (unsigned long)(tests[x].ptlen-1)) printf(", ");
204 if ((err = ocb_decrypt_verify_memory(idx, tests[x].key, 16, tests[x].nonce, outct, tests[x].ptlen,
205 outct, tests[x].tag, len, &res)) != CRYPT_OK) {
208 if ((res != 1) || XMEMCMP(tests[x].pt, outct, tests[x].ptlen)) {
212 for (y = 0; y < (unsigned long)tests[x].ptlen; ) {
214 if (y < (unsigned long)(tests[x].ptlen-1)) printf(", ");