line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Password::Policy::Encryption::SHA1; |
2
|
|
|
|
|
|
|
{ |
3
|
|
|
|
|
|
|
$Password::Policy::Encryption::SHA1::VERSION = '0.02'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# ABSTRACT: The SHA-1 algorithm for Password::Policy |
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
60373
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
83
|
|
9
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
69
|
|
10
|
|
|
|
|
|
|
|
11
|
2
|
|
|
2
|
|
1809
|
use parent 'Password::Policy::Encryption'; |
|
2
|
|
|
|
|
731
|
|
|
2
|
|
|
|
|
9
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
use Digest::SHA1 qw/sha1_hex/; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub enc { |
16
|
|
|
|
|
|
|
my $self = shift; |
17
|
|
|
|
|
|
|
my $password = $self->prepare(shift); |
18
|
|
|
|
|
|
|
return sha1_hex($password); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
1; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=pod |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 NAME |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
Password::Policy::Encryption::SHA1 - The SHA-1 algorithm for Password::Policy |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 VERSION |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
version 0.02 |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 AUTHOR |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
Andrew Nelson |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
This software is copyright (c) 2012 by Andrew Nelson. |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
44
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=cut |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
__END__ |