[#CAST_cbc_encrypt]
= CAST&lowbar;cbc&lowbar;encrypt
:mrdocs:

Encrypt or decrypt data with CAST in CBC mode (deprecated&semi; prefer EVP)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;deprecated&rsqb;&rsqb;
void
CAST&lowbar;cbc&lowbar;encrypt(
    unsigned char const* in,
    unsigned char* out,
    long length,
    xref:CAST_KEY.adoc[CAST&lowbar;KEY] const* ks,
    unsigned char* iv,
    int enc);
----

[WARNING]
====
https://en.cppreference.com/cpp/language/attributes/deprecated[Deprecated^]. Use of this entity is allowed but discouraged.
====
== Parameters

[cols="1,4"]
|===
| Name| Description
| *in*
| Input bytes of length `length&period;`
| *out*
| Output buffer of length `length` (may equal `in)&period;`
| *length*
| Number of bytes to process&period;
| *ks*
| Expanded CAST key from CAST&lowbar;set&lowbar;key()&period;
| *iv*
| 8&hyphen;byte IV updated in place to the last ciphertext block&period;
| *enc*
| CAST&lowbar;ENCRYPT to encrypt, or CAST&lowbar;DECRYPT to decrypt&period;
|===


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