NAME

OpenSSL::HMAC -- Access to OpenSSL hmac functions

SYNOPSIS

        use OpenSSL::HMAC;

DESCRIPTION

        Foo/bar.

FUNCTIONS

@digs = enum_hmac();

Returns a list of supported digests for hmac. (sha1, md5, md2, md4, sha, mdc2, ripemd160, dss, dss1)

$hexhmac = hmac_hex($digname, $key, $string, ...)

returns $digname hmac over $string hex encoded

$binhmac = hmac($digname, $key, $string, ...)

returns $digname hmac over $string raw

$base64_hmac = hmac_base64($digname, $key, $string, ...)

returns $digname hmac over $string base64 encoded

$hex_hmac = {hmacname}_hex($key,$string)

Direct access to low level function.

$raw_hmac = {hmacname}($key,$string)

Direct access to low level function.

$base64_hmac = {hmacname}_base64($key,$string)

Direct access to low level function.

$ctx = {hmacname}_new($key)

Access to classical stream based approach.

$ctx = new_hmac($digname, $key)

Access to classical stream based approach.

$ctx->update($string)

Adds $string to the hmac

$ctx->final

Returns the hmac raw.

$ctx->final_hex

Returns the hmac hex encoded.

$ctx->final_base64

Returns the hmac base64 encoded.

SEE ALSO

OpenSSL, OpenSSL::Digest.

AUTHOR

Stefan Traby <stefan@hello-penguin.com> http://mindterm.plan9.de/