libwget-hash(3)

πŸ’– libwget-hash(3) πŸ’–

okay bestie, listen up β€” this is the libwget-hash page from the Library Functions Manual, and it's literally your whole cheat sheet for hash convenience functions. hashing is just ✨vibes✨ but with math, and this page is the group chat where all the hash girlies hang out. no cap.


🌸 NAME 🌸

libwget-hash β€” Hash convenience functions

like. that's it. that's the name. it does hashes, conveniently. slay.


πŸ¦‹ SYNOPSIS πŸ¦‹

πŸŽ€ Files

  • hashfile.c β€” Hashing functions. that's the file, bestie, that's where the magic lives πŸ’…

πŸŽ€ Typedefs

  • typedef struct wget_hash_hd_st wget_hash_hd β€” Type for hash / digest routines. this is the little handle you hold onto when you're doing hash stuff. main character energy fr.

πŸŽ€ Enumerations

  • enum wget_digest_algorithm { WGET_DIGTYPE_UNKNOWN = 0, WGET_DIGTYPE_MD5, WGET_DIGTYPE_SHA1, WGET_DIGTYPE_RMD160, WGET_DIGTYPE_MD2, WGET_DIGTYPE_SHA256, WGET_DIGTYPE_SHA384, WGET_DIGTYPE_SHA512, WGET_DIGTYPE_SHA224, WGET_DIGTYPE_MAX } β€” Enumeration of different hash digest algorithms. a whole menu of algorithms, pick your fave, they're all iconic in their own way.

πŸŽ€ Functions

void wget_hash_printf_hex (wget_digest_algorithm algorithm, char *out,
    size_t outsize, const char *fmt,...)

one function. one function that does SO much. we love her.


🌈 Detailed Description 🌈

Provides Hash helper functions

that's the whole thing. it provides hash helper functions. short, sweet, does not overexplain, respects your time. periodt. πŸ’…


πŸ‘‘ Enumeration Type Documentation πŸ‘‘

✨ enum wget_digest_algorithm ✨

Enumeration of different hash digest algorithms. here come the girls, one by one:

Enumerator

  • WGET_DIGTYPE_UNKNOWN β€” Indicates 'Unknown hash algorithm', returned by wget_hash_get_algorithm(). it's the "idk her" of the enum, no shade.
  • WGET_DIGTYPE_MD5 β€” Type 'MD5' digest. the classic, the OG, still showing up to the party.
  • WGET_DIGTYPE_SHA1 β€” Type SHA1 digest. she's been around a while, she knows everybody.
  • WGET_DIGTYPE_RMD160 β€” Type RMD160 digest. the underrated one. give her a chance πŸ₯Ί
  • WGET_DIGTYPE_MD2 β€” Type 'MD2' digest. vintage. retro. a little mysterious.
  • WGET_DIGTYPE_SHA256 β€” Type 'SHA256' digest. the it-girl. the moment. the one everybody's talking about πŸ”₯
  • WGET_DIGTYPE_SHA384 β€” Type 'SHA384' digest. SHA256's taller sister, same energy, more to love.
  • WGET_DIGTYPE_SHA512 β€” Type 'SHA512' digest. big. bold. giving maximum security main character. πŸ‘‘
  • WGET_DIGTYPE_SHA224 β€” Type 'SHA224' digest. the compact cutie, does the same job, smaller footprint, still ate. πŸ“
  • WGET_DIGTYPE_MAX β€” Number of digest types. not a real algorithm bestie, she's just the counter at the end. she counts the girls. she's the bouncer at the door. πŸ’€

πŸ’œ Function Documentation πŸ’œ

🧚 void wget_hash_printf_hex (wget_digest_algorithm algorithm, char * out, size_t outsize, const char * fmt, ...)

Parameters

  • algorithm β€” The hash algorithm to use. pick from the enum above, choose your fighter.
  • out β€” Output string buffer. where the pretty hex result gets written, bestie.
  • outsize β€” Size of output string buffer. you gotta tell her how much room she has. do NOT skimp on this, she WILL get upset.
  • fmt β€” Printf-like format specifier. yes, the printf-style one you already know and love.
  • ... β€” List of arguments. all the little guys that go into the format string.

Calculate the hash from the string generated via the printf-style fmt and the following arguments and place it as hexadecimal string into out.

so like β€” you give her a format string, she builds the string for you, hashes it, and hands you back the hex. one stop shop. no extra steps. she's efficient like that. ✨

The ideal length of out would be wget_hash_get_len(type) * 2 + 1.

that's the math, bestie. wget_hash_get_len(type) * 2 + 1. that's how much buffer you want so nobody gets hurt. it's giving "measure twice, cut once" but make it hexadecimal. πŸ“


🫢 Author 🫢

Generated automatically by Doxygen for wget2 from the source code.

yeah, no human wrote this page, it's a robot being a good little documentarian. we still love her though. πŸŽ€


<div align="center">

okay that's the whole page, you made it to the end, proud of you. this was libwget-hash from wget2, Version 2.3.0 β€” now go forth and hash responsibly, bestie πŸ’–βœ¨πŸ¦‹πŸŒΈπŸŽ€πŸ’…πŸ‘‘πŸŒˆβ­πŸ’œ

</div>

πŸ“¦ where this page comes from