KeyPassphrase Event
Fired if the passphrase of current key is incorrect or empty.
Syntax
keymgr.on('KeyPassphrase', [callback])
Callback
The 'callback' is called when the 'KeyPassphrase' event is emited.
function(e){ }
The argument 'e' has the following properties:
e.userId e.keyId e.passphrase
Remarks
This event fires when the passphrase for the key is required. The passphrase must be specified before operations requiring the secret key are attempted. The passphrase may be supplied by setting the Passphrase parameter in this event, or by specifying the KeyPassphrase property before attempting the operation.
The passphrase is required when using the following methods in KeyMgr:
When using the OpenPGP class, or an email-based class, the following methods require a passphrase for the key:
- Decrypt
- Sign
- SignAndEncrypt