Constructor
new SymEncryptedIntegrityProtectedDataPacket()
Members
aeadAlgorithm :enums.aead
Type:
- enums.aead
cipherAlgorithm :enums.symmetric
Type:
- enums.symmetric
Methods
(async) decrypt(sessionKeyAlgorithm, key, configopt) → {Promise.<Boolean>}
Decrypts the encrypted data contained in the packet.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
sessionKeyAlgorithm |
enums.symmetric | The selected symmetric encryption algorithm to be used |
|
key |
Uint8Array | The key of cipher blocksize length to be used |
|
config |
Object |
<optional> |
Full configuration, defaults to openpgp.config |
Throws:
-
on decryption failure
- Type
- Error
Returns:
- Type
- Promise.<Boolean>
(async) encrypt(sessionKeyAlgorithm, key, configopt) → {Promise.<Boolean>}
Encrypt the payload in the packet.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
sessionKeyAlgorithm |
enums.symmetric | The symmetric encryption algorithm to use |
|
key |
Uint8Array | The key of cipher blocksize length to be used |
|
config |
Object |
<optional> |
Full configuration, defaults to openpgp.config |
Throws:
-
on encryption failure
- Type
- Error
Returns:
- Type
- Promise.<Boolean>