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