| OpenBSD::md5(3p) | Perl Programmers Reference Guide | OpenBSD::md5(3p) |
OpenBSD::md5 - simple interface to sha256 digests
use OpenBSD::md5;
my $sha = OpenBSD::sha->new($filename);
$k->{$sha->key} = $filename;
my $ck2 = $sha->new($filename2);
if ($ck2->equals($sha)) {
...
}
print $sha->stringize # provides a base64 representation
my $ck3 = $s->fromstring; # decodes both base64 and hex
"OpenBSD::md5" provides an object-oriented interface to cryptographic hashing facilities for use in the ports tree.
In particular, it provides an abstraction to build crypto hashes from files, convert from and to text, and compare two checksums while keeping the user from making low-level decisions.
The module itself is called "OpenBSD::md5" for historical reasons, but the module only provides a "OpenBSD::sha" class, that produces and writes sha256 digests.
The "OpenBSD::md5" class itself was removed a few years ago.
cksum(1) , Digest::SHA(3p) , Mime::Base64(3p)
| 2023-05-16 | perl v5.40.1 |