Lines Matching refs:ctx
128 static void test_blowfish(AVBlowfish *ctx, uint8_t *dst, const uint8_t *src,
132 av_blowfish_crypt(ctx, dst, src, len, iv, dir);
152 AVBlowfish *ctx = av_blowfish_alloc();
153 if (!ctx)
156 av_blowfish_init(ctx, "abcdefghijklmnopqrstuvwxyz", 26);
158 test_blowfish(ctx, tmp, plaintext, ciphertext, 1, NULL, 0, "encryption");
159 test_blowfish(ctx, tmp, ciphertext, plaintext, 1, NULL, 1, "decryption");
160 test_blowfish(ctx, tmp, tmp, ciphertext, 1, NULL, 0, "Inplace encryption");
161 test_blowfish(ctx, tmp, tmp, plaintext, 1, NULL, 1, "Inplace decryption");
163 test_blowfish(ctx, tmp, plaintext2, ciphertext2, 2, iv, 0, "CBC encryption");
165 test_blowfish(ctx, tmp, ciphertext2, plaintext2, 2, iv, 1, "CBC decryption");
167 test_blowfish(ctx, tmp, tmp, ciphertext2, 2, iv, 0, "Inplace CBC encryption");
169 test_blowfish(ctx, tmp, tmp, plaintext2, 2, iv, 1, "Inplace CBC decryption");
175 av_blowfish_init(ctx, variable_key[i], 8);
177 av_blowfish_crypt_ecb(ctx, &tmptext_l[i], &tmptext_r[i], 0);
183 av_blowfish_crypt_ecb(ctx, &tmptext_l[i], &tmptext_r[i], 1);
190 av_free(ctx);