unwrapMessagePayload

Decrypt and return the payload in the message.

Also store the recipient's session key.

Parameters

message

The RAMF message whose payload should be unwrapped.

Throws

if the payload was encrypted with an unknown key.

if the private key couldn't be retrieved or the peer's session key could not be saved.

if the ciphertext or plaintext of the payload is invalid.