line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package File::KDBX::Key::Password; |
2
|
|
|
|
|
|
|
# ABSTRACT: A password key |
3
|
|
|
|
|
|
|
|
4
|
6
|
|
|
6
|
|
2519
|
use warnings; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
168
|
|
5
|
6
|
|
|
6
|
|
25
|
use strict; |
|
6
|
|
|
|
|
9
|
|
|
6
|
|
|
|
|
119
|
|
6
|
|
|
|
|
|
|
|
7
|
6
|
|
|
6
|
|
25
|
use Crypt::Digest qw(digest_data); |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
206
|
|
8
|
6
|
|
|
6
|
|
28
|
use Encode qw(encode); |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
189
|
|
9
|
6
|
|
|
6
|
|
29
|
use File::KDBX::Error; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
289
|
|
10
|
6
|
|
|
6
|
|
34
|
use File::KDBX::Util qw(:class erase); |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
603
|
|
11
|
6
|
|
|
6
|
|
42
|
use namespace::clean; |
|
6
|
|
|
|
|
9
|
|
|
6
|
|
|
|
|
38
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
extends 'File::KDBX::Key'; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
our $VERSION = '0.906'; # VERSION |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub init { |
18
|
47
|
|
|
47
|
1
|
81
|
my $self = shift; |
19
|
47
|
|
33
|
|
|
129
|
my $primitive = shift // throw 'Missing key primitive'; |
20
|
|
|
|
|
|
|
|
21
|
47
|
|
|
|
|
179
|
$self->_set_raw_key(digest_data('SHA256', encode('UTF-8', $primitive))); |
22
|
|
|
|
|
|
|
|
23
|
47
|
|
|
|
|
188
|
return $self->hide; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |