nooschain / crypto/encryption / encryptPayloadPerRecord
Variable: encryptPayloadPerRecord
constencryptPayloadPerRecord: (args) =>Promise<EncryptionResult> =encryptPayload
Defined in: crypto/encryption.ts:197
Alias for the per-record encryption mode used by bucket policy code.
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>