use Crypt::CBC; # The Sagepay test login is at: # https://test.sagepay.com/mysagepay # Login using your administrator username and password. If # you don't know what they are contact SagePay support and # they will send a reset link to the registered email # address of the administrator. After you login you # will see Encryption Password: <16 character long string> my $id = <16 char long Encryption Password>; # e.g. AbcdeFghiJkLmNoP my $iv = $id; my $cipher = Crypt::CBC->new( -key => $id, -iv => $iv, -cipher => 'OpenSSL::AES', -literal_key => 1, -header => "none", -padding => "standard", -keysize => 16 ); $crypt = uc $cipher->encrypt_hex($crypt); $crypt = "@".$crypt;