Re: Crypt_GPG: Retrieving passphrase

From: Date: Mon, 01 Aug 2011 19:15:08 +0000
Subject: Re: Crypt_GPG: Retrieving passphrase
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-54419@lists.php.net to get a copy of this message
Hi Randy, You can't programmatically retrieve a key's passphrase. Passphrases are supposed to be secret and secure, so GnuPG will never reveal it for you. It sounds like the key you used to encrypt data requires a passphrase to decrypt. The docs say the passphrase is optional for addDecryptKey because you can have an encryption key without a passphrase. If you've used a key that requires a passphrase to decrypt, the passphrase is required in addDecryptKey. Hope this helps. Cheers, Mike On 2011-08-01 16:05, Brown, Randy wrote:
Hi – I’ve not tracked down a method for retrieving the key’s passphrase. I need this in order to be able to dynamically select from a group of keys to decrypt a file. The docs say this is an optional param to addDecryptKey, but the ‘No passphrase provided for keys’ error is thrown without. Can you help? Thanks, Randy Brown | e: rebrown@phdmc.org Web Administrator | w: www.phdmc.org Public Health - Dayton & Montgomery County | t: 937.224.8071 Confidentiality Statement: This electronic mail transmission and any attached document(s) may contain information from Public Health - Dayton & Montgomery County that is confidential. This information is intended only for the individual(s) named on this electronic mail. If you are not an intended recipient, you are hereby notified that any disclosure, copying, distribution, or the taking of any action in reliance on the contents of this electronic mail is strictly prohibited. If you have received this electronic mail transmission in error, please notify us so that we can arrange that the electronic mail transmission be directed to the correct recipient(s). Please destroy all copies that were sent to you in error. Thank you.


« previous php.pear.dev (#54419) next »