shishi_hmac_md5(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_hmac_md5 πŸ’–

okay so bestie, welcome to the shishi_hmac_md5(3) page β€” yes it's from the shishi manual, section 3, the library-functions section, we love her πŸ’…. This is the API function that does the keyed-hash thing and she is lowkey iconic. Let's get into it 🫢


✨ NAME ✨

shishi_hmac_md5 β€” it's an API function, periodt. πŸ“›


🌈 SYNOPSIS 🌈

#include <shishi.h>

int shishi_hmac_md5(Shishi * handle, const char * key, size_t keylen,
const char * in, size_t inlen, char * outhash[16]);

not me dropping the whole signature up here so you can copy-paste it like the main character you are 😌


πŸŽ€ ARGUMENTS πŸŽ€

  • Shishi * handle β€” the shishi handle, and it's gotta be the one you allocated with shishi_init(). no random handle bestie, she needs to be legit πŸ’–
  • const char * key β€” an input character array holding the key you wanna use. this is the secret sauce, guard it with your life πŸ”
  • size_t keylen β€” the length of that input character array with the key. yes, you have to tell her how long your key is, she's not psychic πŸ™ˆ
  • const char * in β€” the input character array of the data you want to hash. the actual snack being processed πŸ“
  • size_t inlen β€” the length of the input character array of the data to hash. again, lengths matter, always πŸŽ€
  • char * outhash[16] β€” the newly allocated character array with the keyed hash of data. it's 16, she's specific, respect it ✨

πŸ’… DESCRIPTION πŸ’…

So what does she do? She computes a keyed checksum of data using HMAC-MD5. that's the whole vibe. πŸ¦‹

⚠️ heads up bestie: the outhash buffer must be deallocated by the caller. she allocates it, but you have to free it. the way that memory is your responsibility now... not me letting you leak it 😭

⭐ RETURN VALUE ⭐

Returns SHISHI_OK iff successful. that's the only happy path. anything else and we're in our flop era, sorry πŸ’€


πŸ”₯ REPORTING BUGS πŸ”₯

Found a bug? (gasp πŸ™ˆ) 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/

fr fr, they wanna hear from you, don't be shy 🫢


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.

slay, that's a very generous license bestie, we love a permissive queen 🌸


🌈 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, go read the whole thing, she's got lore πŸ“š


and that's the page!! πŸ’–

signing off from the shishi manual, version 1.0.3, page shishi_hmac_md5(3) β€” stay keyed, stay hashed, and go free that outhash buffer, bestie πŸŽ€βœ¨πŸ¦‹