shishi_arcfour(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_arcfour ✨

okay bestie, welcome to the shishi manual page for shishi_arcfour(3) β€” yes it's section 3, yes it's an API function, and yes we're gonna get through it together πŸ’–


πŸŽ€ NAME πŸŽ€

shishi_arcfour β€” it's an API function, babe. that's the whole name section. slay.


🌸 SYNOPSIS 🌸

#include <shishi.h>

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

look at that signature. it's giving many parameters. we love a thorough queen πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

okay so here's the cast of characters, one by one, no skipping, we're being thorough because that's the vibe:

  • Shishi * handle β€” your shishi handle, as allocated by shishi_init(). it's the main character of every shishi story fr fr.
  • int decryptp β€” the mood ring of this function: 0 means we're encrypting, anything non-0 means we're decrypting. pick your fighter πŸ’…
  • const char * key β€” input character array holding the key you wanna use.
  • size_t keylen β€” how long that key array is. gotta tell her the length, she can't read minds.
  • const char iv[258] β€” input character array with the initialization vector to use, or NULL. yes, 258. hold that thought 🫢
  • char * ivout[258] β€” output character array with the updated initialization vector, or NULL. she gives you back a new one, iconic.
  • const char * in β€” the input character array of data to encrypt/decrypt. the actual snack.
  • size_t inlen β€” length of that input data array. again, lengths matter, always.
  • char ** out β€” a newly allocated character array with the encrypted/decrypted data. newly allocated!! remember that for later, it's important 😭

πŸ’œ DESCRIPTION πŸ’œ

So: this function encrypts or decrypts data (whichever one, it depends on decryptp, see above bestie) using ARCFOUR. and listen β€” the out buffer must be deallocated by the caller. that's you. that's your job now. no one else is gonna free it. not me, not shishi, not the universe. you. 🫡

Now, the "initialization vector" being used here β€” and I'm putting that in quotes because the manpage does, and honestly it's for a reason β€” is the concatenation of the sbox and i and j, and it is therefore always of size 256 + 1 + 1. yeah. that math. that's the whole thing.

this is a slight abuse of terminology, and it assumes you know what you are doing. and like, it literally says don't use it if you can avoid to. that's not me being dramatic, that's the actual text. so if you can avoid it, AVOID IT. πŸ’€

⭐ RETURN VALUE ⭐

Returns SHISHI_OK iff successful. that's it, that's the whole section. short queen behavior.


πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? not you being the main character of QA ✨ 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: take 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. iykyk 🐚


okay bestie, that's the whole page β€” this was shishi version 1.0.3, and yes, the page is shishi_arcfour(3), dated and stamped just like that. go free your out buffer, stay hydrated, and don't touch that iv unless you truly know what you're doing πŸ’…πŸ’–πŸ¦‹