encrypt
encrypt(
plaintext,options):Promise<Uint8Array<ArrayBufferLike>>
Defined in: packages/filecoin-encryption-envelope/src/aes-gcm.ts:86
Encrypt a complete plaintext as scheme 1 and return envelope || ciphertext.
Borrows its inputs: callers must not modify plaintext, keys, recipients or metadata until the promise settles. The IV is always generated internally and cannot be provided by the caller.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
plaintext | Uint8Array |
options | EncryptOptions |
Returns
Section titled “Returns”Promise<Uint8Array<ArrayBufferLike>>