line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package File::KDBX::Key::Password; |
2
|
|
|
|
|
|
|
# ABSTRACT: A password key |
3
|
|
|
|
|
|
|
|
4
|
6
|
|
|
6
|
|
2637
|
use warnings; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
169
|
|
5
|
6
|
|
|
6
|
|
27
|
use strict; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
118
|
|
6
|
|
|
|
|
|
|
|
7
|
6
|
|
|
6
|
|
24
|
use Crypt::Digest qw(digest_data); |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
208
|
|
8
|
6
|
|
|
6
|
|
27
|
use Encode qw(encode); |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
161
|
|
9
|
6
|
|
|
6
|
|
26
|
use File::KDBX::Error; |
|
6
|
|
|
|
|
7
|
|
|
6
|
|
|
|
|
282
|
|
10
|
6
|
|
|
6
|
|
34
|
use File::KDBX::Util qw(:class erase); |
|
6
|
|
|
|
|
7
|
|
|
6
|
|
|
|
|
656
|
|
11
|
6
|
|
|
6
|
|
37
|
use namespace::clean; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
31
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
extends 'File::KDBX::Key'; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
our $VERSION = '0.905'; # VERSION |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub init { |
18
|
47
|
|
|
47
|
1
|
73
|
my $self = shift; |
19
|
47
|
|
33
|
|
|
106
|
my $primitive = shift // throw 'Missing key primitive'; |
20
|
|
|
|
|
|
|
|
21
|
47
|
|
|
|
|
162
|
$self->_set_raw_key(digest_data('SHA256', encode('UTF-8', $primitive))); |
22
|
|
|
|
|
|
|
|
23
|
47
|
|
|
|
|
181
|
return $self->hide; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |