@filoz/filecoin-encryption-envelope
Filecoin Encryption Envelope (FIP-1253) - Main Entry Point
Example
Section titled “Example”import * as fee from '@filoz/filecoin-encryption-envelope'
source.pipeThrough(fee.encrypt({ cek })) // chunked stream, the defaultfee.aesGcm.encrypt(plaintext, { cek }) // whole-object, opt-infee.constants.ALG_A256KWNamespaces
Section titled “Namespaces”| Namespace | Description |
|---|---|
| aesGcm | - |
| constants | - |
| cose | COSE decode-only inspection surface (FIP-1253): read an untrusted envelope into its typed protected header, unprotected header, and recipient list. See docs/tech-spec.md, “Wire profile” and “CDDL”. |
| errors | - |
| recipients | - |
Interfaces
Section titled “Interfaces”| Interface | Description |
|---|---|
| ChunkedEncryptOptions | Options for one chunked AES-256-GCM STREAM encryption using a direct CEK. |
Type Aliases
Section titled “Type Aliases”| Type Alias | Description |
|---|---|
| AppMetadata | Opaque, string-keyed application metadata. Carried but never interpreted. |
| CborValue | CBOR values supported by this profile. |
Functions
Section titled “Functions”| Function | Description |
|---|---|
| encrypt | Encrypt a plaintext stream using scheme 2 (chunked AES-256-GCM STREAM) and a direct CEK. |