IPWorks OpenPGP 2020 Python Edition

Questions / Feedback?

decrypt_and_verify_signature Method

Decrypts and verifies the signature of the message.

Syntax

def decrypt_and_verify_signature() -> None: ...

Remarks

This method attempts to both decrypt and verify the signature of the message. All of the properties affected by calling the decrypt and verify_signature methods are affected in the same manner.

This method may be used when the data is signed, encrypted, or signed and encrypted. For instance, if the data is encrypted but not signed you may still use this method and the class will perform the decryption without error.

The message will be decrypted using the keys specified in the Key* properties. Before decryption begins the class will fire the on_recipient_info event with information about the encrypted message, including the key used to encrypt the message. Within this event you may use the available information to load the correct key into keys.

The message will be verified using the keys specified in the SignerKey* properties. Before verification begins the class will fire the on_signature_info event with information about the signature including the key used to sign the message. Within this event you may use the information available to load the correct key into the SignerKey* properties.

By default, if the signature is not valid the class fails with an error. The configuration setting RequireValidSignature may be set to False to disable this requirement. When RequireValidSignature is set to False, the Status parameter of the on_verification_status event should be checked to determine the result of the operation.

NOTE: This method does not attempt to check the validity of the signing key itself.

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