Passphrase/Hashed.pm

filter: Statementstmt 92.0% 23 / 25 Branchbran 43.7% 7 / 16 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 93.3% 14 / 15 Podpod 91.6% 11 / 12 totaltotal 80.8% 55 / 68 CC 9 SCAR 7.6
CC
9
Cov
73%
scheme
6.0
new
2.1
rfc2307
2.1
CRAP 2.1
« Passphrase/Core.pm ↑ Summary Passphrase.pm »
1 package Dancer2::Plugin::Passphrase::Hashed;
2 11 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 11 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 11 ▶use MIME::Base64 qw(encode_base64);
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 # ABSTRACT: Passphrases and Passwords as objects for Dancer2
7  
8 =head1 NAME
9  
10 Dancer2::Plugin::Passphrase::Hashed - Helper package for Dancer2::Plugin::Passphrase.
11  
12 =head1 METHODS
13  
14 =head2 rfc2307()
15  
16 =head2 scheme()
17  
18 =head2 algorithm()
19  
20 =head2 cost()
21  
22 =head2 plaintext()
23  
24 =head2 salt_raw()
25  
26 =head2 hash_raw()
27  
28 =head2 salt_hex()
29  
30 =head2 hash_hex()
31  
32 =head2 salt_base64()
33  
34 =head2 hash_base64()
35  
36 =head1 AUTHOR
37  
38 Maintainer: Henk van Oers <hvoers@cpan.org>
39  
40 =head1 COPYRIGHT AND LICENSE
41  
42 This software is copyright (c) 2012 by James Aitken.
43  
44 This is free software; you can redistribute it and/or modify it under
45 the same terms as the Perl 5 programming language system itself.
46  
47 =cut
48  
49 89 ▶sub new {
Subroutine new: called CC=2 SCAR=7.6
Pod undocumented
50 89 my $class = shift;
51 89 my @args = @_;
52 0 ▶ return bless { @args == 1 ? %{$args[0]} : @args }, $class;
Branch: 1 branch
BranchTrueFalseTotal
@args == 1 ? : 0 89 89
53 }
54  
55 88 ▶sub rfc2307 { $_[0]->{'rfc2307'} || undef }
Subroutine rfc2307: called CC=2 SCAR=7.6
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
$_[0]{"rfc2307"} or undef 88 0 88
56 0 ▶sub scheme { $_[0]->{'scheme'} || undef }
Subroutine scheme: not called CC=2 SCAR=17.9
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
$_[0]{"scheme"} or undef 0 0 0
57 1 ▶sub algorithm { $_[0]->{'algorithm'} || undef }
Subroutine algorithm: called CC=2 SCAR=7.6
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
$_[0]{"algorithm"} or undef 1 0 1
58 1 ▶sub cost { $_[0]->{'cost'} || undef }
Subroutine cost: called CC=2 SCAR=7.6
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
$_[0]{"cost"} or undef 1 0 1
59 1 ▶sub plaintext { $_[0]->{'plaintext'} || undef }
Subroutine plaintext: called CC=2 SCAR=7.6
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
$_[0]{"plaintext"} or undef 1 0 1
60 3 ▶sub salt_raw { $_[0]->{'salt'} || undef }
Subroutine salt_raw: called CC=2 SCAR=7.6
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
$_[0]{"salt"} or undef 3 0 3
61 2 ▶sub hash_raw { $_[0]->{'hash'} || undef }
Subroutine hash_raw: called CC=2 SCAR=7.6
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
$_[0]{"hash"} or undef 2 0 2
62 3 ▶sub salt_hex { unpack 'H*', $_[0]->{'salt'} }
Subroutine salt_hex: called CC=1 SCAR=0.0
Pod documented
63 2 ▶sub hash_hex { unpack 'H*', $_[0]->{'hash'} }
Subroutine hash_hex: called CC=1 SCAR=0.0
Pod documented
64 3 ▶sub salt_base64 { encode_base64( $_[0]->{'salt'}, '' ) }
Subroutine salt_base64: called CC=1 SCAR=0.0
Pod documented
65 2 ▶sub hash_base64 { encode_base64( $_[0]->{'hash'}, '' ) }
Subroutine hash_base64: called CC=1 SCAR=0.0
Pod documented
66  
67 11 1;
« Passphrase/Core.pm ↑ Summary Passphrase.pm »