Closed michaelgracie closed 5 years ago
To do the reverse is here https://github.com/singpolyma/openpgp-php/blob/master/lib/openpgp_crypt_symmetric.php#L78 but I think no one has ever wanted to encrypt a secret key with the library before. It should not be too hard to add, based on the decrypt key code and the generic encrypt code, but is not there yet I think.
Appreciate the response.
Testing pgp_keygen.php produces expected results, including ASCII-armored key pairs that are acceptable to GPGMail. Cannot figure out how to output password protected private key though. Have tested a derivative using rsa->setPassword() which will output encrypted RSA private key, but no such success once hitting OpenPGP_SecretKeyPacket.