libmd(7)

πŸ’– libmd β€” Message Digest functions from BSD systems πŸ’–

okay bestie, sit DOWN, because this one is literally the glue holding a bunch of BSD-flavored crypto code together, and you're gonna love her.


✨ NAME ✨

libmd β€” Message Digest functions from BSD systems, and she's serving compatibility, she's serving portability, she's serving range. πŸ’…


🌸 DESCRIPTION 🌸

so like, the libmd library hands you all the message digest functions that BSD systems just have β€” either chilling in their libc or hanging out in their own libmd libraries β€” and which other systems (looking at you, GNU systems πŸ‘€) are just… missing. the whole point? making it easier to port projects with strong BSD origins without needing to embed the exact same code over and over again in every single project. not me copy-pasting my own homework forty times, no ma'am, we are DONE with that era. 🫢

the library also provides a compatibility interface for the Aladding Enterprises MD5 implementation β€” but here's the tea: that interface is NOT exposed by default, specifically to avoid polluting the namespace. we're tidy in this house. ✨ to actually get at it, you need to define the LIBMD_MD5_ALADDIN pre-processor variable. that's the unlock code, bestie. πŸ”‘

also!! the library provides a pkgconf(1) entry named libmd. so if you're out here fighting with build flags, pkgconf has you. iykyk. πŸ’–


πŸ”₯ ALGORITHMS πŸ”₯

the library supports the following message digest algorithms β€” and it's a whole roster, she's stacked:

  • MD2
  • MD4
  • MD5
  • RIPEMD-160
  • SHA-1
  • SHA-2 (SHA-224, SHA-256, SHA-384, SHA-512/224, SHA-512/256, SHA-512)
  • SHA-3 (SHA3-224, SHA3-256, SHA3-384, SHA3-512, SHAKE-128, SHAKE-256)
not a single one missing. we ate. πŸ“

πŸŽ€ HEADERS πŸŽ€

the libmd library provides compatibility with various BSD headers and interfaces, so no matter which BSD your code escaped from, there's a little home for it here. 🏠

πŸ’œ Compatibility with NetBSD and OpenBSD

these following headers are provided for compatibility with NetBSD and OpenBSD:

  • <md2.h>
  • <md4.h>
  • <md5.h>
  • <rmd160.h>
  • <sha1.h>
  • <sha2.h>

πŸ¦‹ Compatibility with NetBSD

this following header is provided for compatibility with NetBSD:

  • <sha3.h>

⭐ Compatibility with FreeBSD and DragonFly

these following headers are provided for compatibility with FreeBSD and DragonFly:

  • <ripemd.h>
  • <sha.h>
  • <sha256.h>
  • <sha512.h>

πŸ‘‘ SEE ALSO πŸ‘‘

go read these next, bestie, they're the main characters of this whole situation:


🌈 HISTORY 🌈

okay storytime, because the lore here is genuinely iconic. πŸ“–βœ¨

the libmd project started in the Debian GNU/kFreeBSD port as part of the libbsd library, as a way to ease porting code from FreeBSD to the GNU-based system. she was born out of necessity, a true humble beginnings arc. πŸ₯Ή

then β€” glow up β€” it was subsequently split into a project created on Hadrons.Org (mirrored on FreeDesktop.Org) for other distributions and projects to use, and further extended to match the other BSD interfaces. she said "i'm not just one distro's girl, i'm everyone's girl." πŸ’…

and now? it is now distributed as part of most non-BSD distributions. periodt. she made it. πŸ‘‘


and that's the whole vibe, bestie πŸŽ€ β€” this one came to us from Debian, dated Jul 11, 2022, and it's still out here carrying BSD message digests across the whole ecosystem. mwah, no notes. πŸ’–βœ¨

πŸ“¦ where this page comes from