Configure a cipher filter BIO with algorithm, key, IV, and encrypt/decrypt mode.

Synopsis

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);

Return Value

1 on success, or 0 on failure.

Parameters

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.

Created with MrDocs