Lines Matching defs:cipher
56 static int cipher_init(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
65 /* Use a normal cipher init */
66 return EVP_CipherInit_ex(ctx, cipher, NULL, t->key, t->iv, enc)
70 /* The authenticated cipher init */
74 return EVP_CipherInit_ex(ctx, cipher, NULL, NULL, NULL, enc)
90 EVP_CIPHER *cipher = NULL;
99 cipher = EVP_CIPHER_fetch(libctx, t->base.algorithm, NULL);
100 if (cipher == NULL)
105 if (!cipher_init(ctx, cipher, t, encrypt)
127 /* Decrypt cipher text */
129 if (!(cipher_init(ctx, cipher, t, !encrypt)
143 EVP_CIPHER_free(cipher);