Configure a cipher filter BIO with algorithm, key, IV, and encrypt/decrypt mode.
Declared in <openssl/evp.h>
int
BIO_set_cipher(
BIO* b,
EVP_CIPHER const* c,
unsigned char const* k,
unsigned char const* i,
int enc);
1 on success, or 0 on failure.
| Name | Description |
|---|---|
| b | BIO created with BIO_f_cipher(). |
| c | Cipher algorithm to use. |
| k | Key bytes whose length matches the cipher's key length. |
| i | IV bytes whose length matches the cipher's IV length (may be NULL for ECB). |
| enc | 1 to encrypt, or 0 to decrypt. |