Home | History | Annotate | Download | only in eax

Lines Matching refs:tests

41    } tests[] = {
227 for (x = 0; x < (int)(sizeof(tests)/sizeof(tests[0])); x++) {
229 if ((err = eax_encrypt_authenticate_memory(idx, tests[x].key, tests[x].keylen,
230 tests[x].nonce, tests[x].noncelen, tests[x].header, tests[x].headerlen,
231 tests[x].plaintext, tests[x].msglen, outct, outtag, &len)) != CRYPT_OK) {
234 if (XMEMCMP(outct, tests[x].ciphertext, tests[x].msglen) || XMEMCMP(outtag, tests[x].tag, len)) {
238 for (y = 0; y < (unsigned long)tests[x].msglen; ) {
240 if (y < (unsigned long)(tests[x].msglen-1)) printf(", ");
254 if ((err = eax_decrypt_verify_memory(idx, tests[x].key, tests[x].keylen,
255 tests[x].nonce, tests[x].noncelen, tests[x].header, tests[x].headerlen,
256 outct, tests[x].msglen, outct, outtag, len, &res)) != CRYPT_OK) {
259 if ((res != 1) || XMEMCMP(outct, tests[x].plaintext, tests[x].msglen)) {
263 for (y = 0; y < (unsigned long)tests[x].msglen; ) {
265 if (y < (unsigned long)(tests[x].msglen-1)) printf(", ");