shishi_crypto(3)
π 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 fromshishi_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>. π
- 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. 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. π
πΈπ¦
π¦ 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