Whirlpool(3pm)

πŸ’œ Whirlpool β€” the Perl manual page, bestie edition

okay so you found Whirlpool(3pm), a User Contributed Perl Documentation page, and honestly? it's giving cryptography royalty. let's get into it ✨


🌸 NAME 🌸

Digest::Whirlpool β€” a 512-bit, collision-resistant, one-way hash function. no cap, that's literally the whole job description.


πŸ¦‹ ABSTRACT πŸ¦‹

WHIRLPOOL is a 512-bit, collision-resistant, one-way hash function developed by Paulo S. L. M. Barreto and Vincent Rijmen. it's been recommended by the NESSIE project (along with SHA-256/384/512) and adopted as ISO/IEC 10118-3. so yeah, it has range πŸ’…


✨ SYNOPSIS ✨

in programs:

# Using L<Digest> (recommended)
use Digest;

my $whirlpool = Digest->new( 'Whirlpool' );

# Get a hash and reset the object
$whirlpool->add( "hash this" );
my $hexdigest = $whirlpool->hexdigest;

# Populate the object again, and clone it before getting the
# digest to avoid resetting
$whirlpool->add( "hash this" );
my $b64digest = $whirlpool->clone->b64digest;
$whirlpool->add( "add this to the hash" );

# Using this module directly (same interface)
use Digest::Whirlpool;
my $whirlpool = Digest->new( 'Whirlpool' );
$whirlpool->add( ... );
....

from the command line:

whirlpoolsum files
whirlpoolsum --help

πŸ‘‘ DESCRIPTION πŸ‘‘

so basically this gives you an interface to the WHIRLPOOL hash algorithm. this module subclasses Digest::base and you can use it either directly or through the Digest meta-module. and like… using the meta-module is recommended. do that one. 🫢


🌈 EXPORT 🌈

None. that's it. nothing to see here. zero exports. she's not sharing. πŸ’€


πŸŽ€ METHODS πŸŽ€

okay so since this module implements the standard Digest interface and you should be using it through the Digest module, go read that documentation for the general interface. below is the tea on the methods that differ. πŸ“

clone

copy the internal state of the current object into a new object and return it. it's giving "duplicate myself, respectfully". 🧚

reset

resets the object to the same internal state it was in when it was constructed.

this works exactly like "new" except it doesn't allocate new memory for its internal state. so it's the thrifty icon behavior ✨

base64digest

a legacy alias for the b64digest method, which should be used instead. pls use b64digest, bestie, she's the upgraded version πŸ’…

hashsize

returns the size (in bits) of a WHIRLPOOL hash, i.e. 512. yes the answer is 512. it's always 512. πŸ‘‘


πŸ’– SEE ALSO πŸ’–


🌟 AUTHORS & HISTORY 🌟

the original version of this package was written by Julius C. Duque in 2003. then it got rewritten by Γ†var ArnfjΓΆrΓ° Bjarmason <avar@cpan.org> in January 2007, who added compatability with the Digest interface, improved documentation and a whirlpoolsum(1) command-line utility amongst other things. glow-up era fr fr 😭


πŸ’€ BUGS πŸ’€

please report any bugs that aren't already listed at <http://rt.cpan.org/Dist/Display.html?Queue=Digest-Whirlpool> to <http://rt.cpan.org/Public/Bug/Report.html?Queue=Digest-Whirlpool>. if you find one, that's your main character moment, go tell them 🫢


πŸ“œ LICENSE πŸ“œ

this program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Copyright 2003 Julius C. Duque and 2007 and 2009 Γ†var ArnfjΓΆrΓ° Bjarmason.


ok that's the whole page bestie, every option, every method, every copyright line, untouched and iconic. iykyk 🌸

and that's a wrap on the Whirlpool page from User Contributed Perl Documentation, shipping with perl v5.40.0, dated 2024-12-09 β€” mwah, slay, periodt πŸ’…βœ¨

πŸ“¦ where this page comes from