/home/abui.../aes_cbc.h(3)
π /home/abui.../aes_cbc.h(3) β Library Functions Manual
okay so bestie, welcome to the AES-CBC page π this is from the /home/abui.../aes_cbc.h(3) manual, and we're about to get very cozy with some block cipher functions. no cap.
β¨ NAME β¨
/home/abuild/rpmbuild/BUILD/libzpc-legacy-1.5.0-build/libzpc-1.5.0/include/zpc/aes_cbc.h β the AES-CBC API. that's the whole vibe. it's giving "header file that knows exactly what it is." π¦
πΈ SYNOPSIS πΈ
Functions
here's the whole squad β every single one of them, no cuts:
int zpc_aes_cbc_alloc (struct zpc_aes_cbc **ctx)
int zpc_aes_cbc_set_key (struct zpc_aes_cbc *ctx, struct zpc_aes_key *key)
int zpc_aes_cbc_set_iv (struct zpc_aes_cbc *ctx, const unsigned char *iv)
int zpc_aes_cbc_get_intermediate_iv (struct zpc_aes_cbc *ctx, unsigned char iv[16])
int zpc_aes_cbc_set_intermediate_iv (struct zpc_aes_cbc *ctx, const unsigned char iv[16])
int zpc_aes_cbc_encrypt (struct zpc_aes_cbc *ctx, unsigned char *ct, const unsigned char *pt, size_t ptlen)
int zpc_aes_cbc_decrypt (struct zpc_aes_cbc *ctx, unsigned char *pt, const unsigned char *ct, size_t ctlen)
void zpc_aes_cbc_free (struct zpc_aes_cbc **ctx)
π Detailed Description π
AES-CBC API. literally the entire subtitle. π
so this is the encryption API for the Advanced Encryption Standard (AES) block cipher [1], operating in Cipher Block Chaining (CBC) mode of operation [8]. that's the tea β β AES, but chained, bestie.
Definition in file aes_cbc.h. that's where it lives, that's where it eats. π
π Function Documentation π
π int zpc_aes_cbc_alloc (struct zpc_aes_cbc ** ctx)
allocate a shiny new context for an AES-CBC operation β¨ fresh out the box, main character energy.
Parameters
ctxβ AES-CBC context
Returns
0 on success. otherwise, a non-zero error code is returned. (so like, check it, bestie. don't just assume. π)
π¦ int zpc_aes_cbc_set_key (struct zpc_aes_cbc * ctx, struct zpc_aes_key * key)
set the key to be used in the context of an AES-CBC operation. the key!! the most important part!! π₯
Parameters
ctxβ AES-CBC contextkeyβ AES key
Returns
0 on success. otherwise, a non-zero error code is returned.
π int zpc_aes_cbc_set_iv (struct zpc_aes_cbc * ctx, const unsigned char * iv)
set the initialization vector to be used in the context of an AES-CBC operation. yes bestie, CBC needs an IV, this is not optional, this is the whole point of chaining π
Parameters
ctxβ AES-CBC contextivβ 16 byte initialization vector
Returns
0 on success. otherwise, a non-zero error code is returned.
π§ int zpc_aes_cbc_get_intermediate_iv (struct zpc_aes_cbc * ctx, unsigned char iv[16])
get the intermediate initialization vector to be used in the context of an AES-CBC operation. peek at it. read it. it's yours now π
Parameters
ctxβ AES-CBC contextivβ application provided buffer with16bytes size to receive the16byte intermediate iv β so you bring the buffer, and it must be16bytes, okurrr π
Returns
0 on success. otherwise, a non-zero error code is returned.
β int zpc_aes_cbc_set_intermediate_iv (struct zpc_aes_cbc * ctx, const unsigned char iv[16])
set the intermediate initialization vector to be used in the context of an AES-CBC operation.
π¨ important bestie: an initial iv must be set before via zpc_aes_cbc_set_iv. like, do that first. order matters. no skipping steps π
Parameters
ctxβ AES-CBC contextivβ 16 byte intermediate iv
Returns
0 on success. otherwise, a non-zero error code is returned.
π₯ int zpc_aes_cbc_encrypt (struct zpc_aes_cbc * ctx, unsigned char * ct, const unsigned char * pt, size_t ptlen)
do an AES-CBC encryption operation. turn that plaintext into ciphertext, slay π β¨
Parameters
ctxβ AES-CBC contextctβ ciphertextptβ plaintextptlenβ plaintext length [bytes]
Returns
0 on success. otherwise, a non-zero error code is returned.
π«Ά int zpc_aes_cbc_decrypt (struct zpc_aes_cbc * ctx, unsigned char * pt, const unsigned char * ct, size_t ctlen)
do an AES-CBC decryption operation. the reverse slay. ciphertext goes in, plaintext comes out πΈ
Parameters
ctxβ AES-CBC contextptβ plaintextctβ ciphertextctlenβ ciphertext length [bytes]
Returns
0 on success. otherwise, a non-zero error code is returned.
π void zpc_aes_cbc_free (struct zpc_aes_cbc ** ctx)
free an AES-CBC context. clean up after yourself, bestie β leaving contexts lying around is not the move ππ§Ή
Parameters
ctxβ AES-CBC context
π Author π
generated automatically by Doxygen for libzpc from the source code. not a human, just a very diligent robot π§ββοΈ
and that's the page!! hope you had fun, iykyk π
libzpc Β· Version 1.4 Β· /home/abui.../aes_cbc.h(3) β ok bye bestie, go encrypt something iconic ππ
π¦ where this page comes from
- opensuse-leap 16.0: libzpc-legacy-devel 1.5.0-160000.2.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms