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