Lines Matching refs:n

295 static int test_bf_ecb_raw(int n)  in test_bf_ecb_raw()  argument
301 BF_set_key(&key, strlen(bf_key[n]), (unsigned char *)bf_key[n]); in test_bf_ecb_raw()
303 data[0] = bf_plain[n][0]; in test_bf_ecb_raw()
304 data[1] = bf_plain[n][1]; in test_bf_ecb_raw()
306 if (!TEST_mem_eq(&(bf_cipher[n][0]), BF_BLOCK, &(data[0]), BF_BLOCK)) in test_bf_ecb_raw()
310 if (!TEST_mem_eq(&(bf_plain[n][0]), BF_BLOCK, &(data[0]), BF_BLOCK)) in test_bf_ecb_raw()
316 static int test_bf_ecb(int n) in test_bf_ecb() argument
322 BF_set_key(&key, 8, ecb_data[n]); in test_bf_ecb()
324 BF_ecb_encrypt(&(plain_data[n][0]), out, &key, BF_ENCRYPT); in test_bf_ecb()
325 if (!TEST_mem_eq(&(cipher_data[n][0]), BF_BLOCK, out, BF_BLOCK)) in test_bf_ecb()
329 if (!TEST_mem_eq(&(plain_data[n][0]), BF_BLOCK, out, BF_BLOCK)) in test_bf_ecb()
335 static int test_bf_set_key(int n) in test_bf_set_key() argument
341 BF_set_key(&key, n+1, key_test); in test_bf_set_key()
344 if (!TEST_mem_eq(out, 8, &(key_out[n][0]), 8)) in test_bf_set_key()
379 int n, ret = 1; in test_bf_cfb64() local
389 n = 0; in test_bf_cfb64()
391 &key, iv, &n, BF_ENCRYPT); in test_bf_cfb64()
393 len - 13, &key, iv, &n, BF_ENCRYPT); in test_bf_cfb64()
397 n = 0; in test_bf_cfb64()
399 BF_cfb64_encrypt(cbc_out, cbc_in, 17, &key, iv, &n, BF_DECRYPT); in test_bf_cfb64()
401 &key, iv, &n, BF_DECRYPT); in test_bf_cfb64()
411 int n, ret = 1; in test_bf_ofb64() local
421 n = 0; in test_bf_ofb64()
423 &n); in test_bf_ofb64()
425 len - 13, &key, iv, &n); in test_bf_ofb64()
429 n = 0; in test_bf_ofb64()
431 BF_ofb64_encrypt(cbc_out, cbc_in, 17, &key, iv, &n); in test_bf_ofb64()
432 BF_ofb64_encrypt(&(cbc_out[17]), &(cbc_in[17]), len - 17, &key, iv, &n); in test_bf_ofb64()
462 int n; in setup_tests() local
464 for (n = 0; n < 2; n++) { in setup_tests()
465 ebcdic2ascii(bf_key[n], bf_key[n], strlen(bf_key[n])); in setup_tests()