shishi_crypto_encrypt(3)
π shishi_crypto_encrypt(3) β the glow-up encryption function π
okay bestie, welcome to section 3 of the shishi manual πΈ this one's about shishi_crypto_encrypt, an API function that takes your plain data and makes it β¨mysteriousβ¨. yes we're doing crypto, no we are not being normal about it.
β¨ SYNOPSIS β¨
#include <shishi.h>
int shishi_crypto_encrypt(Shishi_crypto * ctx, const char * in, size_t
inlen, char ** out, size_t * outlen);
that's the whole vibe right there π
π ARGUMENTS π
Shishi_crypto * ctxβ your crypto context, like, the one you got back fromshishi_crypto(). it's holding the lore (and the key, and the IV). do not lose it πconst char * inβ the input array, aka the data you wanna encrypt. your lil secret π€«size_t inlenβ how big that input array is, in size units. yes we're counting, bestie π’char ** outβ output array with the newly allocated encrypted data. freshly malloc'd, just for you π«Άsize_t * outlenβ output variable that gets the size of that newly allocated output array. so you know how much glow-up you just received β¨
π« DESCRIPTION π«
So. You call this and it encrypts your data, using all the info from the context β like the key and the initialization vector. it's giving "we already handled the setup, you just send it" π₯
important tea: the IV gets updated inside the context after this call. so the context is not the same context afterwards, it's evolved. main character growth, honestly π
And when your app is done with the context, like truly done, you should deallocate the resources tied to it by calling shishi_crypto_close(). clean up after yourself, it's the polite thing to do π§ don't just leave your crypto context lying around, that's not the vibe.
β RETURN VALUE β
Returns SHISHI_OK iff successful. that's it, that's the whole condition. iff. iconic wording, we respect it π
π REPORTING BUGS π
found a bug? don't be shy, report it to <bug-shishi@gnu.org>.
- GNU Shishi home page:
http://www.gnu.org/software/shishi/ - General help using GNU software:
http://www.gnu.org/gethelp/
π COPYRIGHT π
Copyright Β© 2002-2022 Simon Josefsson.
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.
(translation: use it, share it, just keep the receipts π)
π SEE ALSO π
The full documentation for shishi is maintained as a Texinfo manual. If the info and shishi programs are properly installed at your site, the command
info shishi
should give you access to the complete manual. go read it, it's the extended lore πβ¨
okay that's the whole page, bestie π¦ this was shishi_crypto_encrypt(3) from shishi version 1.0.3 β stay encrypted, stay slay π πΈ
π¦ where this page comes from
- debian bookworm: shishi-doc 1.0.3-1 Β· GPL-3.0-or-later
- debian trixie: shishi-doc 1.0.3-5 Β· GPL-3.0-or-later
- nixos 26.05: shishi 1.0.3
- nixpkgs unstable: shishi 1.0.3
- ubuntu noble: shishi-doc 1.0.3-2.1build2 Β· GPL-3.0-or-later
- ubuntu questing: shishi-doc 1.0.3-5
- ubuntu resolute: shishi-doc 1.0.3-5build1 Β· GPL-3.0-or-later
- ubuntu stonking: shishi-doc 1.0.3-7 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms