Module: worker/worker

Methods

(inner) configure(config)

Set config from main context to worker context.

Parameters:
Name Type Description
config Object

The openpgp configuration

Source:

(inner) delegate(method, options)

Generic proxy function that handles all commands from the public api.

Parameters:
Name Type Description
method String

The public api function to be delegated to the worker thread

options Object

The api function's options

Source:

(inner) randomCallback() → {Promise.<Object>}

Handle random buffer exhaustion by requesting more random bytes from the main window

Source:
Returns:

Empty promise whose resolution indicates that the buffer has been refilled

Type
Promise.<Object>

(inner) response(event)

Respond to the main window.

Parameters:
Name Type Description
event Object

Contains event type and data

Source:

(inner) seedRandom(buffer)

Seed the library with entropy gathered window.crypto.getRandomValues as this api is only avalible in the main window.

Parameters:
Name Type Description
buffer ArrayBuffer

Some random bytes

Source: