Crypt-Bear
view release on metacpan or search on metacpan
lib/Crypt/Bear/HMAC.pm view on Meta::CPAN
my $key = Crypt::Bear::HMAC::Key->new('sha256', '0123456789ABCDEF');
my $digester = Crypt::Bear::HMAC->new($key);
while(<>) {
$digester->update($_);
}
say unpack 'H*', $digester->out;
=head1 DESCRIPTION
This represents a streaming implementation of hmac on top of common hash functions.
=head1 METHODS
=head2 new($key)
Returns a new HMAC based on the C<$key>, which should be a L<Crypt::Bear::HMAC::Key|Crypt::Bear::HMAC::Key>.
=head2 update(data)
This feeds data to the hasher.
lib/Crypt/Bear/Hash.pm view on Meta::CPAN
=head1 SYNOPSIS
my $digester = Crypt::Bear::Hash->new('sha226');
while(<>) {
$digester->update($_);
}
say unpack 'H*', $digester->out;
=head1 DESCRIPTION
This represents a streaming implementation of common hash functions.
=head1 METHODS
=head2 new($digest)
This creates a new hasher. The digest name must be one of the following.
=over 4
=item * C<'md5'>
lib/Crypt/Bear/PEM/Decoder.pm view on Meta::CPAN
});
while(<>) {
$decoder->push($_);
}
die "PEM file was truncated" if $decoder->entry_in_progress;
=head1 DESCRIPTION
This implements a streaming PEM decoder. In most cases you'll want the non-streaming C<pem_decode> function in L<Crypt::Bear::PEM>.
=head1 METHODS
=head2 new($callback)
This creates a new decoder, and sets a callback that will be called whenever an entry has completed.
=head2 push($data)
This pushes data to the decoder, potentially causing the callback to be called.
( run in 0.256 second using v1.01-cache-2.11-cpan-4d50c553e7e )