Members
aeadAlgorithm :enums.aead
Type:
- enums.aead
- Source:
cipherAlgorithm :enums.symmetric
Type:
- enums.symmetric
- Source:
Methods
(async) decrypt(sessionKeyAlgorithm, key, configopt)
Decrypt the encrypted payload.
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| sessionKeyAlgorithm | enums.symmetric | The session key's cipher algorithm | |
| key | Uint8Array | The session key used to encrypt the payload | |
| config | Object | <optional> | Full configuration, defaults to openpgp.config | 
- Source:
Throws:
- 
        if decryption was not successful 
- Type
- Error
(async) encrypt(sessionKeyAlgorithm, key, configopt)
Encrypt the packet payload.
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| sessionKeyAlgorithm | enums.symmetric | The session key's cipher algorithm | |
| key | Uint8Array | The session key used to encrypt the payload | |
| config | Object | <optional> | Full configuration, defaults to openpgp.config | 
- Source:
Throws:
- 
        if encryption was not successful 
- Type
- Error
(async) read(bytes)
Parse an encrypted payload of bytes in the order: version, IV, ciphertext (see specification)
Parameters:
| Name | Type | Description | 
|---|---|---|
| bytes | Uint8Array | ReadableStream.<Uint8Array> | 
- Source:
Throws:
- 
        on parsing failure 
- Type
- Error
write() → {Uint8Array|ReadableStream.<Uint8Array>}
Write the encrypted payload of bytes in the order: version, IV, ciphertext (see specification)
- Source:
Returns:
The encrypted payload.
- Type
- Uint8Array | ReadableStream.<Uint8Array>