Encryption.pm did not return a true value at test.pl line 3.
BEGIN failed--compilation aborted at test.pl line 3
####
#!/usr/bin/perl -w
use strict;
use Encryption;
my $ENC=Encryption->new();
my $TestString="This is a test";
my $EncryptedString = $ENC->encrypt_acctnumber($TestString);
print"\$EncryptedString is : $EncryptedString";
##
##
#!/usr/bin/perl -w
use strict;
use ConfigFile;
use CBC;
use Blowfish_PP;
use Env qw (INI);
package Encryption;
sub new{
my $pkg = shift;
# Default to the .ini file in the current directory
if(!defined($INI)){
$INI = "test.ini";
}
# Read the .ini file for the key setting
my $ini = ConfigFile->new($INI);
my $KEY = $ini->Parameter('Key','1');
# Create the Encryption object
my $CBC = new CBC($KEY,'Blowfish');
return bless $pkg;
}
sub encrypt_acctnumber{
my $encrypted=$CBC->encrypt_hex($_[0]);
return $encrypted;
}