nooschain / crypto/encryption / encryptPayload
Function: encryptPayload()
encryptPayload(
args):Promise<EncryptionResult>
Defined in: crypto/encryption.ts:125
Encrypts one payload with a fresh per-record DEK and recipient key envelopes.
The returned payload hash is over the original plaintext bytes, not ciphertext. The temporary DEK and normalized plaintext buffer are zeroed before returning.
Parameters
args
plaintext
string | Uint8Array<ArrayBufferLike> | Buffer<ArrayBufferLike>
recipients
object[]
Returns
Promise<EncryptionResult>