Class: Recipient

Recipient(params)

Recipient class

A Univrse Recipient is a structure wrapping a set of headers and an optional content encryption key.

Constructor

new Recipient(params)

Instantiates a new Recipient instance with the given params.

Accepted params

  • headers - headers object
  • key - content encryption key
Parameters:
Name Type Description
params Object
Source:

Classes

fromArray
wrap

Methods

(async) decrypt(key, opts) → {Recipient}

Decrypts the key using the given encryption key.

An second argument of options can be given for the relevant encryption algorithm.

Parameters:
Name Type Description
key Key
opts Object
Source:
Returns:
Type
Recipient

toArray() → {Array}

Returns the Recipient as an array of component parts.

Used internally prior to encoding the recipient.

Source:
Returns:
Type
Array