line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Crypt::Keyczar::Encrypter; |
2
|
4
|
|
|
4
|
|
1085
|
use base 'Crypt::Keyczar'; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
1075
|
|
3
|
4
|
|
|
4
|
|
27
|
use strict; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
69
|
|
4
|
4
|
|
|
4
|
|
18
|
use warnings; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
66
|
|
5
|
4
|
|
|
4
|
|
15
|
use Carp; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
474
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub encrypt { |
9
|
1
|
|
|
1
|
0
|
399
|
my $self = shift; |
10
|
1
|
|
|
|
|
3
|
my $result = ''; |
11
|
1
|
|
|
|
|
4
|
my $key = $self->get_key($self->primary); |
12
|
1
|
50
|
|
|
|
4
|
if (!$key) { |
13
|
0
|
|
|
|
|
0
|
croak "no primary key"; |
14
|
|
|
|
|
|
|
} |
15
|
1
|
|
|
|
|
3
|
my $crypt = $key->get_engine(); |
16
|
1
|
|
|
|
|
3
|
my $signer = $key->get_sign_engine(); |
17
|
1
|
|
|
|
|
8
|
$result .= $key->get_header(); |
18
|
1
|
|
|
|
|
83
|
$result .= $crypt->init(); # set iv? |
19
|
1
|
|
|
|
|
21
|
$result .= $crypt->encrypt($_[0]); |
20
|
1
|
|
|
|
|
6
|
$signer->update($result); |
21
|
1
|
|
|
|
|
6
|
$result .= $signer->sign(); |
22
|
1
|
|
|
|
|
10
|
return $result; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
__END__ |