#!/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; }