Class: openpgp_msg_message

openpgp_msg_message

Top-level message object. Contains information from one or more packets

<protected> new openpgp_msg_message()

Source:

Methods

<inner> decrypt(private_key, sessionkey) → {String}

Decrypts a message and generates user interface message out of the found. MDC will be verified as well as message signatures
Parameters:
Name Type Description
private_key openpgp_msg_privatekey the private the message is encrypted with (corresponding to the session key)
sessionkey openpgp_packet_encryptedsessionkey the session key to be used to decrypt the message
Source:
Returns:
plaintext of the message or null on error
Type
String

<inner> decryptAndVerifySignature(private_key, sessionkey, pubkey) → {String}

Decrypts a message and generates user interface message out of the found. MDC will be verified as well as message signatures
Parameters:
Name Type Description
private_key openpgp_msg_privatekey the private the message is encrypted with (corresponding to the session key)
sessionkey openpgp_packet_encryptedsessionkey the session key to be used to decrypt the message
pubkey openpgp_msg_publickey Array of public keys to check signature against. If not provided, checks local keystore.
Source:
Returns:
plaintext of the message or null on error
Type
String

<inner> verifySignature(pubkey) → {boolean}

Verifies a message signature. This function can be called after read_message if the message was signed only.
Parameters:
Name Type Description
pubkey openpgp_msg_publickey Array of public keys to check signature against. If not provided, checks local keystore.
Source:
Returns:
true if the signature was correct; otherwise false
Type
boolean