rise~ SignedRiseMessage

new SignedRiseMessage()

Interface for digitall signed rise message

Extends

Members

body :Object.<string, string>|string

Key-value pairs given for the message.

Type:
  • Object.<string, string> | string

Default message headers, plus any custom ones supplied.

Methods

decrypt(privateKey) → {module:rise~RiseMessage}

Decrypts the message using the supplied private key.

Parameters:
NameTypeDescription
privateKeyUint8Array | buffer

Private key to use.

encrypt(publicKey) → {module:rise~EncryptedRiseMessage}

Encrypts the message state for the public key provided.

Parameters:
NameTypeDescription
publicKeyUint8Array | buffer

Recipient public key.

sign(privateKey) → {module:rise~SignedRiseMessage}

Signs the message state using the private key provided.

Parameters:
NameTypeDescription
privateKeyUint8Array | buffer

Identity to use for signature.

toBuffer() → {buffer}

Serializes the message to wire format.

Returns:
Type: 
buffer

unwrap() → {Object.<string, (string|module:rise~RiseMessage|module:rise~EncryptedRiseMessage|module:rise~SignedRiseMessage|string)>}

Returns only the body of this message.

validate() → {boolean}

Ensures the solution header is valid.

Returns:
Type: 
boolean

verify() → {boolean}

Ensures that the digita signature is valid.

Returns:
Type: 
boolean