line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Crypt::OpenToken::Cipher::null; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
9
|
use Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
4
|
1
|
|
|
1
|
|
7939
|
use Crypt::NULL; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
31
|
|
5
|
1
|
|
|
1
|
|
6
|
use namespace::autoclean; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
15
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
with 'Crypt::OpenToken::Cipher'; |
8
|
|
|
|
|
|
|
|
9
|
3
|
|
|
3
|
1
|
21
|
sub keysize { 0 } |
10
|
3
|
|
|
3
|
1
|
16
|
sub iv_len { 0 } |
11
|
|
|
|
|
|
|
sub cipher { |
12
|
|
|
|
|
|
|
# its a "NULL" cipher... there's *no* need for a key or an iv... |
13
|
3
|
|
|
3
|
1
|
28
|
return Crypt::NULL->new('dummy key'); |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
1; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 NAME |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
Crypt::OpenToken::Cipher::null - Null encryption support for OpenToken |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 DESCRIPTION |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
This library can be used by C<Crypt::OpenToken> to encrypt payloads using |
25
|
|
|
|
|
|
|
NULL encryption. |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Yes, that's right, "null encryption" (e.g. B<no> encryption of the data |
28
|
|
|
|
|
|
|
whatsoever). Horrible for real-world use, great for interoperability testing. |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 METHODS |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=over |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=item keysize() |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
Returns the key size used for NULL encryption; 0 bytes. |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=item iv_len() |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Returns the length of the Initialization Vector needed for NULL encryption; 0 |
41
|
|
|
|
|
|
|
bytes. |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=item cipher($key, $iv) |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Returns a C<Crypt::CBC> compatible cipher the implements the NULL encryption. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=back |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 AUTHOR |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Graham TerMarsch (cpan@howlingfrog.com) |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
C<Crypt::OpenToken> is Copyright (C) 2010, Socialtext, and is released under |
56
|
|
|
|
|
|
|
the Artistic-2.0 license. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 SEE ALSO |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
L<Crypt::OpenToken::Cipher> |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=cut |