[#EVP_Cipher-0f]
= EVP&lowbar;Cipher
:mrdocs:

Encrypt or decrypt up to `inl` bytes from `in` into `out` (legacy one&hyphen;shot)&period;

== Synopsis

Declared in `&lt;openssl&sol;evp&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;Cipher(
    xref:EVP_CIPHER_CTX.adoc[EVP&lowbar;CIPHER&lowbar;CTX]* c,
    unsigned char* out,
    unsigned char const* in,
    unsigned int inl);
----

== Description

Prefer EVP&lowbar;CipherUpdate() and EVP&lowbar;CipherFinal&lowbar;ex() for new code&period;

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *c*
| Cipher context already initialized for encrypt or decrypt&period;
| *out*
| Output buffer for the transformed bytes&period;
| *in*
| Input bytes to process&period;
| *inl*
| Number of input bytes&semi; for legacy ciphers without EVP&lowbar;CIPH&lowbar;FLAG&lowbar;CUSTOM&lowbar;CIPHER must be a multiple of the block size&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
