Lines Matching refs:cipher
142 static int pkcs5_pbe2_cipher_init(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, in pkcs5_pbe2_cipher_init() argument
147 if (iv_len != EVP_CIPHER_iv_length(cipher)) { in pkcs5_pbe2_cipher_init()
154 EVP_CIPHER_key_length(cipher), key) && in pkcs5_pbe2_cipher_init()
155 EVP_CipherInit_ex(ctx, cipher, NULL /* engine */, key, iv, enc); in pkcs5_pbe2_cipher_init()
161 const EVP_CIPHER *cipher, unsigned iterations, in PKCS5_pbe2_encrypt_init() argument
164 int cipher_nid = EVP_CIPHER_nid(cipher); in PKCS5_pbe2_encrypt_init()
172 if (!RAND_bytes(iv, EVP_CIPHER_iv_length(cipher))) { in PKCS5_pbe2_encrypt_init()
192 !CBB_add_asn1_uint64(&kdf_param, EVP_CIPHER_key_length(cipher))) || in PKCS5_pbe2_encrypt_init()
199 !CBB_add_bytes(&iv_cbb, iv, EVP_CIPHER_iv_length(cipher)) || in PKCS5_pbe2_encrypt_init()
204 return pkcs5_pbe2_cipher_init(ctx, cipher, iterations, pass, pass_len, salt, in PKCS5_pbe2_encrypt_init()
205 salt_len, iv, EVP_CIPHER_iv_length(cipher), in PKCS5_pbe2_encrypt_init()
230 const EVP_CIPHER *cipher = cbs_to_cipher(&enc_obj); in PKCS5_pbe2_decrypt_init() local
231 if (cipher == NULL) { in PKCS5_pbe2_decrypt_init()
261 if (key_len != EVP_CIPHER_key_length(cipher)) { in PKCS5_pbe2_decrypt_init()
304 return pkcs5_pbe2_cipher_init(ctx, cipher, (unsigned)iterations, pass, in PKCS5_pbe2_decrypt_init()