shishi_crypto(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(3) πŸ’–

okay so bestie, you know how the shishi manual has a whole section 3 full of library functions? yeah. this is one of them. it's the crypto one. let's get into it 🫢


✨ NAME ✨

shishi_crypto β€” it's an API function, babes. that's the whole name.


🌸 SYNOPSIS 🌸

#include <shishi.h>

Shishi_crypto * shishi_crypto(Shishi * handle, Shishi_key * key, int
       keyusage, int32_t etype, const char * iv, size_t ivlen);

πŸŽ€ ARGUMENTS πŸŽ€

  • Shishi * handle β€” your shishi handle, the one you got from shishi_init(). yes, that one. the starter pack. πŸ”₯
  • Shishi_key * key β€” the key you're encrypting with. the main character of this operation, honestly.
  • int keyusage β€” an integer that says what this key is gonna encrypt/decrypt. like, its whole job description. πŸ’…
  • int32_t etype β€” an integer that tells it which cipher to use. pick your fighter. ✨
  • const char * iv β€” input array holding the initialization vector. the little chaos sprinkle. πŸ¦‹
  • size_t ivlen β€” the size of that input array with the initialization vector. gotta know how big the sprinkle is.

πŸ’œ DESCRIPTION πŸ’œ

So. You're initializing a crypto context. That's the vibe. πŸ’«

What this does is it stores a key, a keyusage, an encryption type and an initialization vector all cozy inside a "context". And then?? The caller can just use that context to do encryption via shishi_crypto_encrypt() and decryption via shishi_crypto_encrypt() β€” without having to supply all those little details over and over again. obsessed. no cap. 😭

The functions also take care of propagating the IV between calls, so you don't have to babysit it. it just does that. iconic behaviour.

And when your application no longer needs the context? bestie, please. deallocate the resources associated with it by calling shishi_crypto_close(). do NOT leave it hanging. that's not the move. πŸ™ˆ

⭐ RETURN VALUE ⭐

It returns a newly allocated crypto context. brand new. fresh out the box. go off. πŸ‘‘


🌈 REPORTING BUGS 🌈

Found a bug? Spill. Report bugs 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. periodt. πŸ“œβœ¨


🧚 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. iykyk πŸ’–


okay that's the whole page!! this was shishi_crypto(3) from the shishi manual, version 1.0.3. mwah, go encrypt something responsibly. πŸ’…πŸŒΈπŸ¦‹