Digest::HMAC



Digest::HMAC

NAME
SYNOPSIS
DESCRIPTION
SEE ALSO
AUTHORS

NAME

Digest::HMAC − Keyed−Hashing for Message Authentication

SYNOPSIS

 # Functional style
 use Digest::HMAC qw(hmac hmac_hex);
 $digest = hmac($data, $key, \&myhash);
 print hmac_hex($data, $key, \&myhash);
 # OO style
 use Digest::HMAC;
 $hmac = Digest::HMAC−>new($key, "Digest::MyHash");
 $hmac−>add($data);
 $hmac−>addfile(*FILE);
 $digest = $hmac−>digest;
 $digest = $hmac−>hexdigest;
 $digest = $hmac−>b64digest;

DESCRIPTION

HMAC is used for message integrity checks between two parties that share a secret key, and works in combination with some other Digest algorithm, usually MD5 or SHA−1 . The HMAC mechanism is described in RFC 2104.

HMAC follow the common "Digest::" interface, but the constructor takes the secret key and the name of some other simple "Digest::" as argument.

The hmac() and hmac_hex() functions and the Digest::HMAC−>new() constructor takes an optional $blocksize argument as well. The HMAC algorithm assumes the digester to hash by iterating a basic compression function on blocks of data and the $blocksize should match the byte-length of such blocks.

The default $blocksize is 64 which is suitable for the MD5 and SHA−1 digest functions. For stronger algorithms the blocksize probably needs to be increased.

SEE ALSO

Digest::HMAC_MD5, Digest::HMAC_SHA1

RFC 2104

AUTHORS

Graham Barr <gbarr@ti.com>, Gisle Aas <gisle@aas.no>



More Linux Commands

manpages/Xutf8TextPerCharExtents.3.html
Xutf8TextPerCharExtents(3) - obtain per-character informatio
The XmbTextPerCharExtents, XwcTextPerCharExtents and Xutf8TextPerCharExtents functions return the text dimensions of each character of the specified text, using

manpages/setmntent.3.html
setmntent(3) - get file system descriptor file entry........
These routines are used to access the filesystem description file /etc/fstab and the mounted filesystem description file /etc/mtab. The setmntent() function ope

manpages/grotty.1.html
grotty(1) - groff driver for typewriter-like devices........
grotty translates the output of GNU troff into a form suitable for typewriter-like devices. Normally grotty should be invoked by using the groff command with a

manpages/gnc-fq-dump.1.html
gnc-fq-dump(1) (Commands - Linux manual page)..............
This program obtains information from Finance::Quote about any specified stock, and then dumps it to the screen in annotated form. This will allow someone to se

manpages/tgetent_sp.3ncurses.html
tgetent_sp(3ncurses) - curses screen-pointer extension......
This implementation can be configured to provide a set of functions which improve the ability to manage multiple screens. This feature can be added to any of th

manpages/nrand48.3.html
nrand48(3) - generate uniformly distributed pseudo-random nu
These functions generate pseudo-random numbers using the linear congruential algorithm and 48-bit integer arithmetic. The drand48() and erand48() functions retu

manpages/XtAddGrab.3.html
XtAddGrab(3) - redirect user input to a modal widget........
The XtAddGrab function appends the widget (and associated parameters) to the modal cascade and checks that exclusive is True if spring_loaded is True. If these

manpages/syndaemon.1.html
syndaemon(1) - a program that monitors keyboard activity and
Disabling the touchpad while typing avoids unwanted movements of the pointer that could lead to giving focus to the wrong window. OPTIONS -i &lt;idle-time&gt; How man

manpages/sendmmsg.2.html
sendmmsg(2) send multiple messages on a socket (Man Page)...
The sendmmsg() system call is an extension of sendmsg(2) that allows the caller to transmit multiple messages on a socket using a single system call. (This has

manpages/pcre16_assign_jit_stack.3.html
pcre16_assign_jit_stack(3) Perl-compatible regular expressio
This function provides control over the memory used as a stack at run-time by a call to pcre[16|32]_exec() with a pattern that has been successfully compiled wi

manpages/XDGAGetViewportStatus.3.html
XDGAGetViewportStatus(3) - Client library for the XFree86-DG
The XFree86-DGA extension is an X server extension for allowing client programs direct access to the video frame buffer. This is a brief description of the prog

manpages/gst-device-monitor-1.0.1.html
gst-device-monitor-1.0(1) Simple command line testing tool f
gst-device-monitor-1.0 is a command line tool that can be used to test GStreamers device monitoring functionality. By default it will just print a list of all d





We can't live, work or learn in freedom unless the software we use is free.