| 1 | package Digest::HMAC_MD5; | ||
| 2 | 1 | our $VERSION = '1.05'; # VERSION | |
| 3 | 1 | our $AUTHORITY = 'cpan:ARODLAND'; # AUTHORITY | |
| 4 | |||
| 5 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 1 | ▶ | use Digest::MD5 qw(md5); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 1 | ▶ | use Digest::HMAC qw(hmac); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | # OO interface | ||
| 10 | 1 | our @ISA=qw(Digest::HMAC); | |
| 11 | sub new | ||
| 12 | 7 | ▶ | { |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 13 | 7 | my $class = shift; | |
| 14 | 7 | $class->SUPER::new($_[0], "Digest::MD5", 64); | |
| 15 | } | ||
| 16 | |||
| 17 | # Functional interface | ||
| 18 | 1 | require Exporter; | |
| 19 | 1 | *import = \&Exporter::import; | |
| 20 | 1 | ▶ | use vars qw(@EXPORT_OK); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 21 | 1 | @EXPORT_OK=qw(hmac_md5 hmac_md5_hex); | |
| 22 | |||
| 23 | sub hmac_md5 | ||
| 24 | 7 | ▶ | { |
|
Subroutine
hmac_md5: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 25 | 7 | hmac($_[0], $_[1], \&md5, 64); | |
| 26 | } | ||
| 27 | |||
| 28 | sub hmac_md5_hex | ||
| 29 | 0 | ▶ | { |
|
Subroutine
hmac_md5_hex: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 30 | 0 | unpack("H*", &hmac_md5) | |
| 31 | } | ||
| 32 | |||
| 33 | 1 | 1; | |
| 34 | |||
| 35 | __END__ | ||