diff --git a/Makefile.PL b/Makefile.PL index f8e112b..7e98cea 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -9,10 +9,11 @@ WriteMakefile( Crypt::OpenSSL::RSA => '0.21', Crypt::CBC => '2.12', Crypt::Blowfish => '2.09', + Crypt::URandom => '0.55', Storable => '2.12', MIME::Base64 => '3.01', Test::More => '0.47', - Digest::MD5 => '2.33'}, # e.g., Module::Name => 1.1 + }, # e.g., Module::Name => 1.1 ($] >= 5.005 ? ## Add these new keywords supported since 5.005 (ABSTRACT_FROM => 'lib/Business/OnlinePayment/StoredTransaction.pm', # retrieve abstract from module AUTHOR => 'mock ') : ()), diff --git a/lib/Business/OnlinePayment/StoredTransaction.pm b/lib/Business/OnlinePayment/StoredTransaction.pm index efdd28b..5aeb217 100644 --- a/lib/Business/OnlinePayment/StoredTransaction.pm +++ b/lib/Business/OnlinePayment/StoredTransaction.pm @@ -7,9 +7,9 @@ use Carp; use Business::OnlinePayment; use Crypt::OpenSSL::RSA; use Crypt::CBC; +use Crypt::URandom (); use Storable; use MIME::Base64; -use Digest::MD5; our @ISA = qw(Business::OnlinePayment); @@ -61,7 +61,7 @@ sub submit { if ($actions{$content{action}}) { my $rsa_pub = Crypt::OpenSSL::RSA->new_public_key($public_key); my $plaintext = Storable::nfreeze(\%content); - my $seckey = Digest::MD5::md5_hex(rand()); + my $seckey = Crypt::URandom::urandom(56); my $encseckey; eval { $encseckey = $rsa_pub->encrypt($seckey) }; my $cipher = Crypt::CBC->new( {'key' => $seckey,