ChunkedEncryptOptions
Defined in: packages/filecoin-encryption-envelope/src/aes-gcm-stream.ts:25
Options for one chunked AES-256-GCM STREAM encryption using a direct CEK.
Properties
Section titled “Properties”appMetadata?
Section titled “appMetadata?”
optionalappMetadata?:AppMetadata
Defined in: packages/filecoin-encryption-envelope/src/aes-gcm-stream.ts:35
Authenticated application metadata carried without interpretation.
cek:
Uint8Array
Defined in: packages/filecoin-encryption-envelope/src/aes-gcm-stream.ts:27
Exactly 32 bytes and not all-zero. The caller owns its lifecycle and reuse policy.
chunkSize?
Section titled “chunkSize?”
optionalchunkSize?:number
Defined in: packages/filecoin-encryption-envelope/src/aes-gcm-stream.ts:30
Plaintext bytes per chunk. Defaults to DEFAULT_CHUNK_SIZE.
contentLength?
Section titled “contentLength?”
optionalcontentLength?:number
Defined in: packages/filecoin-encryption-envelope/src/aes-gcm-stream.ts:43
Exact plaintext length, if known up front. Stored in the authenticated
plaintext_length header. Exceeding it fails the write; closing before
reaching it fails the close. In either case, no final chunk is emitted
and earlier output must be discarded. Omit if the length is not guaranteed.
contentType?
Section titled “contentType?”
optionalcontentType?:string|number
Defined in: packages/filecoin-encryption-envelope/src/aes-gcm-stream.ts:32
recipients?
Section titled “recipients?”
optionalrecipients?: readonlyA256KWRecipient[]
Defined in: packages/filecoin-encryption-envelope/src/aes-gcm-stream.ts:49
Wrap the CEK for each recipient and write COSE_Encrypt (tag 96).
Omit for COSE_Encrypt0 (tag 16); an empty array is rejected.