Cargo Features

[dependencies]
cocoon = { version = "0.4.3", default-features = false, features = ["std", "alloc", "getrandom", "thiserror"] }
default = std

Enables std feature by default.

std default = alloc

Enables all features, including support of simplified Cocoon API, using rand::thread_rng, and API related to std::io: wrap to writer, unwrap from reader.

Enables std of rand ^0.8

alloc std

Enables Vec container. Can be used without std crate (in "no std" build).

Enables alloc of chacha20poly1305

getrandom

Enables support of Cocoon::from_entropy() which gets random bytes from OsRng.

Enables getrandom of rand ^0.8

Features from optional dependencies

thiserror implicit feature

Enables thiserror ^1.0.61

thiserror:

derive(Error)