IPWorks OpenPGP 2020 Python Edition

Questions / Feedback?

on_key_passphrase Event

Fired if the passphrase of current key is incorrect or empty.


class KeyMgrKeyPassphraseEventParams(object):
  def user_id() -> str: ...
  def key_id() -> str: ...
  def passphrase() -> str: ...
  def passphrase(value) -> None: ...

# In class KeyMgr:
def on_key_passphrase() -> Callable[[KeyMgrKeyPassphraseEventParams], None]: ...
def on_key_passphrase(event_hook: Callable[[KeyMgrKeyPassphraseEventParams], None]) -> None: ...


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 key_passphrase 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
  • sign_and_encrypt

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks OpenPGP 2020 Python Edition - Version 20.0 [Build 8161]