shishi_crypto_encrypt(3)

πŸ“¦
version 1.0.3 Β· 2 versions
  • 1.0.3 Β· debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.0.2 Β· ubuntu jammy
, in debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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 from shishi_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>.


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 πŸ’…πŸŒΈ