Constructor
new SymEncryptedIntegrityProtectedDataPacket()
Members
encrypted
The encrypted payload.
modification :Boolean
If after decrypting the packet this is set to true, a modification has been detected and thus the contents should be discarded.
Type:
- Boolean
Methods
(async) decrypt(sessionKeyAlgorithm, key, streaming, configopt) → {Boolean}
Decrypts the encrypted data contained in the packet.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
sessionKeyAlgorithm |
String | The selected symmetric encryption algorithm to be used e.g. 'aes128' |
|
key |
Uint8Array | The key of cipher blocksize length to be used |
|
streaming |
Boolean | Whether to read this.encrypted as a stream |
|
config |
Object |
<optional> |
Full configuration, defaults to openpgp.config |
Returns:
- Type
- Boolean
(async) encrypt(sessionKeyAlgorithm, key, streaming, configopt) → {Boolean}
Encrypt the payload in the packet.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
sessionKeyAlgorithm |
String | The selected symmetric encryption algorithm to be used e.g. 'aes128' |
|
key |
Uint8Array | The key of cipher blocksize length to be used |
|
streaming |
Boolean | Whether to set this.encrypted to a stream |
|
config |
Object |
<optional> |
Full configuration, defaults to openpgp.config |
Returns:
- Type
- Boolean