line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Crypt::OpenToken::Cipher; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
4872
|
use Moose::Role; |
|
4
|
|
|
|
|
21178
|
|
|
4
|
|
|
|
|
18
|
|
4
|
4
|
|
|
4
|
|
22528
|
use namespace::autoclean; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
36
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
requires 'keysize'; |
7
|
|
|
|
|
|
|
requires 'iv_len'; |
8
|
|
|
|
|
|
|
requires 'cipher'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
1; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 NAME |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
Crypt::OpenToken::Cipher - Interface for OpenToken Ciphers |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 DESCRIPTION |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
This module defines an interface for ciphers. |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 METHODS |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=over |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=item keysize() |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
Returns the key sized used for encryption, in bytes. |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=item iv_len() |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Returns the length of the Initialization Vector needed for encryption, in |
31
|
|
|
|
|
|
|
bytes. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=item cipher($key, $iv) |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
Returns a C<Crypt::CBC> compatible cipher object which implements the |
36
|
|
|
|
|
|
|
encryption. |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=back |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 AUTHOR |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Graham TerMarsch (cpan@howlingfrog.com) |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
C<Crypt::OpenToken> is Copyright (C) 2010, Socialtext, and is released under |
47
|
|
|
|
|
|
|
the Artistic-2.0 license. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 SEE ALSO |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
L<Crypt::OpenToken::Cipher::AES128> |
52
|
|
|
|
|
|
|
L<Crypt::OpenToken::Cipher::AES256> |
53
|
|
|
|
|
|
|
L<Crypt::OpenToken::Cipher::DES3> |
54
|
|
|
|
|
|
|
L<Crypt::OpenToken::Cipher::NULL> |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=cut |