shishi_hmac_sha1(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_sha1 β€” the manual page, but make it cute πŸ’–

okay bestie, pull up a chair because we're about to talk about the shishi_hmac_sha1 API function, from the shishi manual, section 3. yes it's a crypto thing. yes it's iconic. let's go 🫢


✨ NAME ✨

shishi_hmac_sha1 β€” it's an API function, bestie. that's the whole vibe.


🌸 SYNOPSIS 🌸

first things first, you gotta include the header or nothing works, periodt:

#include <shishi.h>

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

like look at that signature. it's giving main character energy fr fr πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

here's the breakdown of every single thing you're handing over, no skipping, we don't do that here:

  • Shishi * handle β€” the shishi handle, and you get one of those from shishi_init(). it's basically your VIP pass to everything 🎟️
  • const char * key β€” an input character array holding the key you wanna use. the secret sauce, the ~key~ if you will πŸ”‘
  • size_t keylen β€” the length of that input character array with the key to use. don't lie about the length, she'll know πŸ’€
  • const char * in β€” an input character array of the data you want to hash. this is the actual content getting the glow-up ✨
  • size_t inlen β€” the length of the input character array of data to hash. yes, it matters. always 🫢
  • char * outhash[20] β€” a newly allocated character array with the keyed hash of data. fresh out the box, your responsibility now 🎁

πŸ¦‹ DESCRIPTION πŸ¦‹

so what does she actually do? she computes the keyed checksum of data using HMAC-SHA1. that's the whole thing. no cap. 🌈

⚠️ but listen β€” the outhash buffer must be deallocated by the caller. that means you, bestie. you allocated it (well, she did, but on your behalf), so you free it. don't be the person who leaks memory, it's not the vibe πŸ™ˆ

⭐ RETURN VALUE ⭐

returns SHISHI_OK iff successful. that's it. that's the answer. if you see SHISHI_OK you're slaying, if you don't... well 😭


πŸ’€ REPORTING BUGS πŸ’€

found a bug? don't suffer in silence, tell the people:


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. yes she's free, she's generous, she's giving open source royalty πŸ’œ


🌟 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. go read it, it's the whole lore πŸ“šβœ¨


and that's a wrap on shishi_hmac_sha1(3), bestie πŸ’– this page came to you from shishi version 1.0.3, dated back in the day, and honestly? she ate. mwah πŸ’…πŸŽ€πŸ¦‹πŸŒΈπŸ’œ