| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package OAuth::Lite2::Signer::Algorithm::HMAC_SHA256; | 
| 2 |  |  |  |  |  |  |  | 
| 3 | 2 |  |  | 2 |  | 10 | use strict; | 
|  | 2 |  |  |  |  | 5 |  | 
|  | 2 |  |  |  |  | 92 |  | 
| 4 | 2 |  |  | 2 |  | 61 | use warnings; | 
|  | 2 |  |  |  |  | 4 |  | 
|  | 2 |  |  |  |  | 74 |  | 
| 5 |  |  |  |  |  |  |  | 
| 6 | 2 |  |  | 2 |  | 11 | use parent 'OAuth::Lite2::Signer::Algorithm'; | 
|  | 2 |  |  |  |  | 3 |  | 
|  | 2 |  |  |  |  | 16 |  | 
| 7 | 2 |  |  | 2 |  | 1409 | use Digest::SHA; | 
|  | 2 |  |  |  |  | 6954 |  | 
|  | 2 |  |  |  |  | 207 |  | 
| 8 |  |  |  |  |  |  |  | 
| 9 | 2 |  |  | 2 | 1 | 7 | sub name { "hmac-sha256" } | 
| 10 |  |  |  |  |  |  |  | 
| 11 |  |  |  |  |  |  | sub hash { | 
| 12 | 4 |  |  | 4 | 1 | 7 | my ($self, $key, $text) = @_; | 
| 13 | 4 |  |  |  |  | 80 | Digest::SHA::hmac_sha256($text, $key); | 
| 14 |  |  |  |  |  |  | } | 
| 15 |  |  |  |  |  |  |  | 
| 16 |  |  |  |  |  |  | =head1 NAME | 
| 17 |  |  |  |  |  |  |  | 
| 18 |  |  |  |  |  |  | OAuth::Lite2::Signer::Algorithm::HMAC_SHA256 - hmac-sha256 signature algorithm class | 
| 19 |  |  |  |  |  |  |  | 
| 20 |  |  |  |  |  |  | =head1 SYNOPSIS | 
| 21 |  |  |  |  |  |  |  | 
| 22 |  |  |  |  |  |  | my $algorithm = OAuth::Lite2::Signer::Algorithm::HMAC_SHA256->new; | 
| 23 |  |  |  |  |  |  | my $signature = $algorithm->hash($key, $text); | 
| 24 |  |  |  |  |  |  |  | 
| 25 |  |  |  |  |  |  | =head1 DESCRIPTION | 
| 26 |  |  |  |  |  |  |  | 
| 27 |  |  |  |  |  |  | DEPRECATED. 'hmac-sha256' 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-sha256'. | 
| 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 | 
| 48 |  |  |  |  |  |  | L | 
| 49 |  |  |  |  |  |  | L | 
| 50 |  |  |  |  |  |  |  | 
| 51 |  |  |  |  |  |  | =head1 AUTHOR | 
| 52 |  |  |  |  |  |  |  | 
| 53 |  |  |  |  |  |  | Lyo Kato, Elyo.kato@gmail.comE | 
| 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 |  |  |  |  |  |  | 1; |