Last updated
Last updated
Utility class for encryption-related operations.
Bases: object
A utility class that provides additional encryption-related functionalities.
Encrypts a message using the recipient’s public keys.
Parameters:
message (str
) – Message to encrypt
public_keys (List
[str
]) – List of armored public keys of the recipients
Return type: str
Returns: Armored and encrypted message
Example:
Extracts the signed data from an armored signed message.
Parameters: message (str
) – Armored message
Return type: str
Returns: Extracted signed data
Example:
Verifies the signature of a message using the corresponding public key.
Parameters:
message (str
) – Armored message to verify
public_key (str
) – Armored public key
Return type: bool
Returns: True if the signature is valid, False otherwise
Example: