line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package File::KDBX::Key::Password; |
2
|
|
|
|
|
|
|
# ABSTRACT: A password key |
3
|
|
|
|
|
|
|
|
4
|
6
|
|
|
6
|
|
2592
|
use warnings; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
164
|
|
5
|
6
|
|
|
6
|
|
30
|
use strict; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
153
|
|
6
|
|
|
|
|
|
|
|
7
|
6
|
|
|
6
|
|
26
|
use Crypt::Digest qw(digest_data); |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
212
|
|
8
|
6
|
|
|
6
|
|
33
|
use Encode qw(encode); |
|
6
|
|
|
|
|
9
|
|
|
6
|
|
|
|
|
163
|
|
9
|
6
|
|
|
6
|
|
28
|
use File::KDBX::Error; |
|
6
|
|
|
|
|
29
|
|
|
6
|
|
|
|
|
281
|
|
10
|
6
|
|
|
6
|
|
34
|
use File::KDBX::Util qw(:class erase); |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
629
|
|
11
|
6
|
|
|
6
|
|
33
|
use namespace::clean; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
34
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
extends 'File::KDBX::Key'; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
our $VERSION = '0.904'; # VERSION |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub init { |
18
|
47
|
|
|
47
|
1
|
102
|
my $self = shift; |
19
|
47
|
|
33
|
|
|
138
|
my $primitive = shift // throw 'Missing key primitive'; |
20
|
|
|
|
|
|
|
|
21
|
47
|
|
|
|
|
217
|
$self->_set_raw_key(digest_data('SHA256', encode('UTF-8', $primitive))); |
22
|
|
|
|
|
|
|
|
23
|
47
|
|
|
|
|
203
|
return $self->hide; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |