shishi_3des(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_3des β€” bestie, we're doing 3DES today πŸ’–

okay so this is shishi_3des(3), a page straight out of the shishi manual (vibes: crypto, but make it C). It's an API function, so grab a strawberry drink and let's go πŸ“


✨ NAME ✨

shishi_3des β€” it's an API function, bestie. That's the whole name. Short, iconic, no notes πŸ’…


🌸 SYNOPSIS 🌸

#include <shishi.h>

int shishi_3des(Shishi * handle, int decryptp, const char key[8], const
char iv[8], char * ivout[8], const char * in, size_t inlen, char **
out);

like. look at her. seven arguments and she's thriving 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • Shishi * handle β€” the shishi handle, as allocated by shishi_init(). yes, you have to have one. no, you can't skip it. it's the whole personality of the call ✨
  • int decryptp β€” 0 means we're encrypting, non-0 means we're decrypting. literally a boolean with main character energy.
  • const char key[8] β€” input character array holding the key you're gonna use. that's 8 chars of key, fr fr πŸ”‘
  • const char iv[8] β€” input character array with the initialization vector you want, or NULL if you're feeling unbothered. your call πŸ¦‹
  • char * ivout[8] β€” output character array that gets the updated initialization vector, or NULL if you don't want it. the after-glow IV, if you will πŸ’œ
  • const char * in β€” input character array of the data to encrypt/decrypt. the actual content. the moment.
  • size_t inlen β€” length of that input character array. count your blessings, count your bytes πŸ“
  • char ** out β€” a newly allocated character array with the encrypted/decrypted data. it's fresh, it's yours, and you have to clean up after it (more on that below, don't panic) 🎁

πŸ’« DESCRIPTION πŸ’«

Encrypt or decrypt data β€” whichever one you want, and it depends on decryptp β€” using 3DES in CBC mode. that's triple DES, chained block cipher mode, the classic. she ate πŸ”₯

bestie listen: the out buffer must be deallocated by the caller. it is newly allocated memory and it is your responsibility. not the function's. yours. free it or it haunts you forever πŸ‘»

⭐ RETURN VALUE ⭐

Returns SHISHI_OK iff successful. that's the good one. if you see SHISHI_OK you may celebrate πŸŽ‰


🌈 REPORTING BUGS 🌈

found a bug? first of all, relatable. report it to <bug-shishi@gnu.org> πŸ“§

they're nice, they want to hear from you, go off 🫢


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. (aka: go forth, redistribute, 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. iykyk, info pages are lowkey underrated πŸ“–βœ¨


that's the whole page, bestie. no cap, you now know shishi_3des better than most people know their own passwords πŸ’€

shishi 1.0.3 Β· shishi_3des(3) β€” mwah, go encrypt something responsibly πŸ’…πŸŽ€