Encrypted payload.
Methods
(static) decode(buf) → {DecodeResult}
Decode encrypted payload.
NOTE: all structure members are copied.
Parameters:
Name | Type | Description |
---|---|---|
buf |
Buffer | A buffer that contains encrypted payload |
- Source:
Returns:
- Type
- DecodeResult
(static) encode(opts) → {Buffer}
Encode encrypted
.
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
Object | Encoding options Properties
|
- Source:
Returns:
Encoded encrypted
payload.
- Type
- Buffer
Type Definitions
DecodeResult
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
iv |
Buffer | Initialization vector (16 bytes) |
ephemPrivateKey |
Buffer | Ephemeral private key (32 bytes) |
ciphertext |
Buffer | The result of encryption (variable size) |
mac |
Buffer | Message authentication code (32 bytes) |
- Source: