IM::MD5(3pm)

πŸ“¦
version 153 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

✨ IM::MD5 β€” MD5 message-digesting ✨

okay bestie, so this is a page from the Internet Message Perl modules family, and today we're talking about IM::MD5, the little module that does the MD5 message-digest thing. no cap. 🫢


🌸 SYNOPSIS 🌸

the vibe, in code:

use IM::MD5;

$digest = &md5_str($text);

that's it. that's the whole mood. you pull it in, you feed it text, it hands you back a digest. πŸ’…


πŸ’– DESCRIPTION πŸ’–

so, IM::MD5 handles the MD5 message-digest algorithm. that's literally its job. it's giving one-task queen and we respect it.

and this module is provided by IM (Internet Message). so like, it's part of that whole ecosystem, iykyk. 🌈


πŸŽ€ EXAMPLES πŸŽ€

okay here's where it gets fun, bestie. watch what &md5_str does with these inputs β€” every single one, no skipping:

  • &md5_str("") returns d41d8cd98f00b204e9800998ecf8427e.
  • &md5_str("a") returns 0cc175b9c0f1b6a831c399e269772661.
  • &md5_str("abc") returns 900150983cd24fb0d6963f7d28e17f72.
  • &md5_str("message digest") returns f96b697d7cb7938d525a2f31aaf161d0.
  • &md5_str("abcdefghijklmnopqrstuvwxyz") returns c3fcd3d76192e4007dfb496cca67e13b.
  • &md5_str("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") returns d174ab98d277d9f5a5611c2c9f419d9f.
  • &md5_str("12345678901234567890123456789012345678901234567890123456789012345678901234567890") returns 57edf4a22be3c955ac49da2e2107b67a.

and if you wanna run the built-in test, she's right here:

% perl -MIM::MD5 -e 'IM::MD5::MD5_TEST()'

go ahead. run it. it's iconic. πŸ¦‹


okay so, receipts time. this module is derived from md5.pl, which is copyrighted by NAKAMURA, Motonori <motonori@econ.kyoto-u.ac.jp>. it got converted to Perl4 from a C version, and that C version was derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm. lineage? immaculate. 🌟

and IM (Internet Message) is copyrighted by the IM developing team. you can redistribute it and/or modify it under the modified BSD license. for all the fine print, go check the copyright file. it's all there, fr fr. πŸ“œ


ngl, if you're shipping this anywhere important, remember MD5 is old-school β€” but that's the module, bestie, and she does exactly what she says on the tin. πŸ’–

and that's the whole page!! this was IM::MD5(3pm) from IM153, dated 2016-10-10. slay, mwah, go hash something. πŸŽ€βœ¨πŸ’…

πŸ“¦ where this page comes from