IPWorks OpenPGP 2020 Python Edition

Questions / Feedback?

key_passphrase Property

The passphrase for the key's secret key (if any).

Syntax

def get_key_passphrase(key_index: int) -> str: ...
def set_key_passphrase(key_index: int, value: str) -> None: ...

Default Value

""

Remarks

The passphrase for the key's secret key (if any). This must be specified before operations requiring the secret key are attempted. The passphrase may be supplied in this property or through the on_key_passphrase event, which will fire when a passphrase is required.

The passphrase is required when using the following methods in KeyMgr:

  • add_user_id
  • sign_user_id
  • change_expiration_date
  • change_passphrase

When using the OpenPGP class, or an email-based class, the following methods require a passphrase for the key:

  • decrypt
  • sign
  • sign_and_encrypt

The key_index parameter specifies the index of the item in the array. The size of the array is controlled by the key_count property.

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