| 1 | use Crypt::OpenSSL::RSA; | ||
| 2 | #This will print out a public and private RSA key suitable for use by | ||
| 3 | #Business::OnlinePayment::StoredTransaction | ||
| 4 | |||
| 5 | $rsa = Crypt::OpenSSL::RSA->generate_key(1024); # or | ||
| 6 | |||
| 7 | print "private key is:\n", $rsa->get_private_key_string(); | ||
| 8 | print "public key (in PKCS1 format) is:\n", | ||
| 9 | $rsa->get_public_key_string(); | ||
| 10 | |||
| 11 |