blib/lib/OAuth/Lite2/Signer/Algorithm/HMAC_SHA1.pm

filter: Statementstmt 81.2% 13 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod 100% 2 / 2 totaltotal 79.1% 19 / 24 SCAR 0.1
CC
1
Cov
81%
name
2.0
hash
2.0
BEGIN
1.0
CRAP 1.0
« blib/lib/OAuth/Lite2/Agent/Dump.pm ↑ Summary blib/lib/OAuth/Lite2/Formatter/Text.pm »
1 package OAuth::Lite2::Signer::Algorithm::HMAC_SHA1;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use parent 'OAuth::Lite2::Signer::Algorithm';
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use Digest::SHA;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 0 ▶sub name { "hmac-sha1" }
Subroutine name: not called CC=1 SCAR=6.9
Pod documented
10  
11 sub hash {
12 0 ▶ my ($self, $key, $text) = @_;
Subroutine hash: not called CC=1 SCAR=6.9
Pod documented
13 0 Digest::SHA::hmac_sha1($text, $key);
14 }
15  
16 =head1 NAME
17  
18 OAuth::Lite2::Signer::Algorithm::HMAC_SHA1 - hmac-sha1 signature algorithm class
19  
20 =head1 SYNOPSIS
21  
22 my $algorithm = OAuth::Lite2::Signer::Algorithm::HMAC_SHA1->new;
23 my $signature = $algorithm->hash($key, $text);
24  
25 =head1 DESCRIPTION
26  
27 DEPRECATED. 'hmac-sha1' signature algorithm class.
28  
29 =head1 METHODS
30  
31 =head2 new( )
32  
33 Constructor.
34  
35 =head2 name
36  
37 Returns a name of the algorithm, 'hmac-sha1'.
38  
39 =head2 hash( $key, $text )
40  
41 Generate signature.
42  
43 my $signature = $algorithm->hash($key, $text);
44  
45 =head1 SEE ALSO
46  
47 L<OAuth::Lite2::Signer::Algorithm>
48 L<OAuth::Lite2::Signer::Algorithms>
49 L<OAuth::Lite2::Signer::Algorithm::HMAC_SHA256>
50  
51 =head1 AUTHOR
52  
53 Lyo Kato, E<lt>lyo.kato@gmail.comE<gt>
54  
55 =head1 COPYRIGHT AND LICENSE
56  
57 Copyright (C) 2010 by Lyo Kato
58  
59 This library is free software; you can redistribute it and/or modify
60 it under the same terms as Perl itself, either Perl version 5.8.8 or,
61 at your option, any later version of Perl 5 you may have available.
62  
63 =cut
64  
65  
66 1 1;
« blib/lib/OAuth/Lite2/Agent/Dump.pm ↑ Summary blib/lib/OAuth/Lite2/Formatter/Text.pm »