Module web

Source
Expand description

Implementation for the web, backed by Web Crypto.

This module utilizes the symmetric primitives provided by Web Crypto. The streaming interface, enabled using the feature "stream" enables an interface to encrypt data from a Stream<Item = Result<Uint8Array, JsValue>> into a Sink<Uint8Array, Error = JsValue>. These can easily interact with Web Streams using the wasm-streams crate.

This module is only available on the target = "wasm32-unknown-unknown" and the output should be used in browser environments. This also greatly reduces the bundle size.

This module can largely be simplified when the AEAD crate will support async, see the relevant issue.

Modules§

stream
Streaming mode.

Structs§

SealerMemoryConfig
In-memory configuration for a Sealer.
UnsealerMemoryConfig
In-memory configuration for an Unsealer.