Aut/Crypt.pm

filter: Statementstmt 33.3% 7 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 40.0% 2 / 5 Podpod 100% 3 / 3 totaltotal 41.3% 12 / 29 CC 1 SCAR 4.7
CC
1
Cov
33%
new
2.0
encrypt
2.0
decrypt
2.0
CRAP 1.6
« Aut/Ticket.pm ↑ Summary Aut/Base64.pm »
1 package Aut::Crypt;
2  
3 # $Id: Crypt.pm,v 1.2 2004/04/08 16:55:13 cvs Exp $
4  
5 1 ▶use Crypt::CBC;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod documented
9 0 my $class=shift;
10 0 my $key=shift;
11 0 my $self;
12  
13 0 $self->{"key"}=$key;
14  
15 0 bless $self,$class;
16 0 return $self;
17 }
18  
19 0 ▶sub encrypt {
Subroutine encrypt: not called CC=1 SCAR=6.9
Pod documented
20 0 my $self=shift;
21 0 my $text=shift;
22 0 my $cbc=new Crypt::CBC( { 'key' => $self->{"key"}, 'cipher' => 'Blowfish' } );
23 0 return $cbc->encrypt($text);
24 }
25  
26 0 ▶sub decrypt {
Subroutine decrypt: not called CC=1 SCAR=6.9
Pod documented
27 0 my $self=shift;
28 0 my $text=shift;
29 0 my $cbc=new Crypt::CBC( { 'key' => $self->{"key"}, 'cipher' => 'Blowfish' } );
30 0 return $cbc->decrypt($text);
31 }
32  
33 1 1;
34 __END__
« Aut/Ticket.pm ↑ Summary Aut/Base64.pm »