Class: openpgp_msg_message

openpgp_msg_message

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

<protected> new openpgp_msg_message

Source:
  • openpgp.js, line 12196

Methods

<inner> decrypt

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:
  • openpgp.js, line 12211
Returns:
plaintext of the message or null on error
Type
String

<inner> decryptAndVerifySignature

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:
  • openpgp.js, line 12223
Returns:
plaintext of the message or null on error
Type
String

<inner> verifySignature

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:
  • openpgp.js, line 12282
Returns:
true if the signature was correct; otherwise false
Type
boolean