http://qs1969.pair.com?node_id=257240

fuzzyping has asked for the wisdom of the Perl Monks concerning the following question:

I need to encrypt a string using asymmetric keys and a passphrase. I would like to use something like Crypt::OpenPGP, but I don't see the functionality I'm looking for. Basically, I want to take an input string of 16 chars (credit card number) and encrypt it with a public key. The number should only be decrypted by using the private key and the passphrase.

I've looked at Crypt::OpenPGP, as well as some of the other cipher modules (like Crypt::Blowfish), but they either focus on encrypting files (versus stdin/stdout), or they use symmetric keys and passphrases, which aren't an option... I want the passphrase to be kept secret, not available in the source code.

Perhaps I could tie a filehandle to the string? Any suggestions?

-fp