OpenToken/Cipher/null.pm

filter: Statementstmt 100% 14 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 3 / 3 totaltotal 100% 23 / 23 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« OpenToken/Cipher/DES3.pm ↑ Summary
1 package Crypt::OpenToken::Cipher::null;
2  
3 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use Crypt::NULL;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 with 'Crypt::OpenToken::Cipher';
8  
9 3 ▶sub keysize { 0 }
Subroutine keysize: called CC=1 SCAR=0.0
Pod documented
10 3 ▶sub iv_len { 0 }
Subroutine iv_len: called CC=1 SCAR=0.0
Pod documented
11 3 ▶sub cipher {
Subroutine cipher: called CC=1 SCAR=0.0
Pod documented
12 # its a "NULL" cipher... there's *no* need for a key or an iv...
13 3 return Crypt::NULL->new('dummy key');
14 }
15  
16 1 1;
17  
18 =head1 NAME
19  
20 Crypt::OpenToken::Cipher::null - Null encryption support for OpenToken
21  
22 =head1 DESCRIPTION
23  
24 This library can be used by C<Crypt::OpenToken> to encrypt payloads using
25 NULL encryption.
26  
27 Yes, that's right, "null encryption" (e.g. B<no> encryption of the data
28 whatsoever). Horrible for real-world use, great for interoperability testing.
29  
30 =head1 METHODS
31  
32 =over
33  
34 =item keysize()
35  
36 Returns the key size used for NULL encryption; 0 bytes.
37  
38 =item iv_len()
39  
40 Returns the length of the Initialization Vector needed for NULL encryption; 0
41 bytes.
42  
43 =item cipher($key, $iv)
44  
45 Returns a C<Crypt::CBC> compatible cipher the implements the NULL encryption.
46  
47 =back
48  
49 =head1 AUTHOR
50  
51 Graham TerMarsch (cpan@howlingfrog.com)
52  
53 =head1 COPYRIGHT & LICENSE
54  
55 C<Crypt::OpenToken> is Copyright (C) 2010, Socialtext, and is released under
56 the Artistic-2.0 license.
57  
58 =head1 SEE ALSO
59  
60 L<Crypt::OpenToken::Cipher>
61  
62 =cut
« OpenToken/Cipher/DES3.pm ↑ Summary