[#EVP_CipherInit_ex] = EVP_CipherInit_ex :mrdocs: Initialise `ctx` for encryption or decryption with `cipher.` == Synopsis Declared in `<openssl/evp.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int EVP_CipherInit_ex( xref:EVP_CIPHER_CTX.adoc[EVP_CIPHER_CTX]* ctx, xref:EVP_CIPHER-07.adoc[EVP_CIPHER] const* cipher, xref:ENGINE.adoc[ENGINE]* impl, unsigned char const* key, unsigned char const* iv, int enc); ---- == Return Value 1 on success, or 0 on error. == Parameters [cols="1,4"] |=== | Name| Description | *ctx* | Cipher context to initialise. | *cipher* | Cipher algorithm, or NULL to keep the current cipher and change key/IV/dir. | *impl* | Legacy ENGINE, or NULL for the default implementation. | *key* | Raw key bytes, or NULL to set later. | *iv* | IV/nonce bytes, or NULL when not required / set later. | *enc* | 1 to encrypt, 0 to decrypt, or ‐1 to leave the direction unchanged. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#