Global

Methods

clonePackets(options) → {Object}

Create a packetlist from the correspoding object types.
Parameters:
Name Type Description
options Object the object passed to and from the web worker
Source:
Returns:
a mutated version of the options optject
Type
Object

configure(config)

Set config from main context to worker context.
Parameters:
Name Type Description
config Object The openpgp configuration
Source:

decrypt(cipher, ciphertext, key, iv) → {Promise.<Uint8Array>}

Decrypt ciphertext input.
Parameters:
Name Type Description
cipher String The symmetric cipher algorithm to use e.g. 'aes128'
ciphertext Uint8Array The ciphertext input to be decrypted
key Uint8Array The encryption key
iv Uint8Array The initialization vector (12 bytes)
Source:
Returns:
The plaintext output
Type
Promise.<Uint8Array>

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:

encrypt(cipher, plaintext, key, iv) → {Promise.<Uint8Array>}

Encrypt plaintext input.
Parameters:
Name Type Description
cipher String The symmetric cipher algorithm to use e.g. 'aes128'
plaintext Uint8Array The cleartext input to be encrypted
key Uint8Array The encryption key
iv Uint8Array The initialization vector (12 bytes)
Source:
Returns:
The ciphertext output
Type
Promise.<Uint8Array>

module:crypto/hash/md5(entree)

MD5 hash
Parameters:
Name Type Description
entree String string to hash
Source:

parseClonedPackets(options, method) → {Object}

Creates an object with the correct prototype from a corresponding packetlist.
Parameters:
Name Type Description
options Object the object passed to and from the web worker
method String the public api function name to be delegated to the worker
Source:
Returns:
a mutated version of the options optject
Type
Object

response(event)

Respond to the main window.
Parameters:
Name Type Description
event Object Contains event type and data
Source:

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: