NAME

Crypt::Bear::HMAC::Key - A key for HMAC computation.

VERSION

version 0.002

SYNOPSIS

my $key = Crypt::Bear::HMAC::Key->new('sha256', '0123456789ABCDEF');
my $digester = Crypt::Bear::HMAC->new($key);

DESCRIPTION

This represents a key for HMAC computation with a given hash function.

METHODS

new($digest, $key)

This creates a new HMAC key given secret key $key and hash function $digest.

digest()

Return the name of the hash that's being used (e.g. 'sha256')

AUTHOR

Leon Timmermans <fawaka@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2024 by Leon Timmermans.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.