File Coverage

blib/lib/OpenID/Lite/SignatureMethod/HMAC_SHA256.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1             package OpenID::Lite::SignatureMethod::HMAC_SHA256;
2 3     3   15 use Any::Moose;
  3         5  
  3         18  
3             extends 'OpenID::Lite::SignatureMethod';
4 3     3   1493 use Digest::SHA ();
  3         5  
  3         376  
5             # key length 256
6              
7             override 'hmac_hash' => sub {
8             my ( $self, $secret, $key ) = @_;
9             return Digest::SHA::hmac_sha256( $key, $secret );
10             };
11              
12             override 'hmac_hash_hex' => sub {
13             my ( $self, $secret, $key ) = @_;
14             return Digest::SHA::hmac_sha256_hex( $key, $secret );
15             };
16              
17 3     3   14 no Any::Moose;
  3         7  
  3         14  
18             __PACKAGE__->meta->make_immutable;
19             1;
20