| 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
| |||||||||||
| 53 | } | ||||||||||
| 54 | |||||||||||
| 55 | 88 | ▶ | sub rfc2307 { $_[0]->{'rfc2307'} || undef } | ||||||||
|
Subroutine
rfc2307: called CC=2 SCAR=7.6
Pod
documented
Branch: 1 branch
| |||||||||||
| 56 | 0 | ▶ | sub scheme { $_[0]->{'scheme'} || undef } | ||||||||
|
Subroutine
scheme: not called CC=2 SCAR=17.9
Pod
documented
Branch: 1 branch
| |||||||||||
| 57 | 1 | ▶ | sub algorithm { $_[0]->{'algorithm'} || undef } | ||||||||
|
Subroutine
algorithm: called CC=2 SCAR=7.6
Pod
documented
Branch: 1 branch
| |||||||||||
| 58 | 1 | ▶ | sub cost { $_[0]->{'cost'} || undef } | ||||||||
|
Subroutine
cost: called CC=2 SCAR=7.6
Pod
documented
Branch: 1 branch
| |||||||||||
| 59 | 1 | ▶ | sub plaintext { $_[0]->{'plaintext'} || undef } | ||||||||
|
Subroutine
plaintext: called CC=2 SCAR=7.6
Pod
documented
Branch: 1 branch
| |||||||||||
| 60 | 3 | ▶ | sub salt_raw { $_[0]->{'salt'} || undef } | ||||||||
|
Subroutine
salt_raw: called CC=2 SCAR=7.6
Pod
documented
Branch: 1 branch
| |||||||||||
| 61 | 2 | ▶ | sub hash_raw { $_[0]->{'hash'} || undef } | ||||||||
|
Subroutine
hash_raw: called CC=2 SCAR=7.6
Pod
documented
Branch: 1 branch
| |||||||||||
| 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; | |||||||||