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