Digest::base(3perl)
π NAME π
ok so Digest::base β it's the digest base class, bestie. the blueprint. the blueprint-est blueprint. π
β¨ SYNOPSIS β¨
package Digest::Foo;
use base 'Digest::base';
that's it. two lines. iconic behaviour honestly. π
π¦ DESCRIPTION π¦
okay so here's the whole vibe: the Digest::base class hands you free implementations of a couple methods so you don't have to write them yourself, no cap:
- it gives you
addfileandadd_bits, implemented in terms ofadd. π₯ - it gives you
hexdigestandb64digest, implemented in terms ofdigest. π₯
so if you're out here building your own digest implementation and you already got the core stuff working, you might wanna inherit from this class (Digest::base, hi, that's her) to get those alternative add and digest methods for absolutely free. it's giving "borrow your bestie's notes" energy. πβ¨
BUT β and this is the important part, don't skip it π β a minimal subclass still has to implement these methods by itself:
new
clone
add
digest
those four? yeah, those are on you, babe. no inheritance shortcut for those. the class can't do them for you, she doesn't know your algorithm like that. π
fr fr: the arguments and the expected behaviour of all of these methods are described over in Digest. go read that one, iykyk. ππ«Ά
πΈ SEE ALSO πΈ
Digestβ the main character of this whole friend group, go look at her. π
okay that's the whole page, you ate that. made by perl v5.44.0, dated 2026-10-17, and this whole little manual moment comes to you from Digest::base(3perl) π stay blessed, go implement your four methods, mwah πβ¨
π¦ where this page comes from
- arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms