Cargo Features

[dependencies]
ssb-crypto = { version = "0.2.3", default-features = false, features = ["alloc", "dalek", "dalek_module", "force_sodium", "sodium", "sodium_module", "b64", "getrandom"] }
default = alloc, b64, dalek, getrandom

These default features are set whenever ssb-crypto is added without default-features = false somewhere in the dependency tree.

alloc default = b64

Enables alloc of base64 ^0.13.0

dalek default = dalek_module
dalek_module dalek = curve25519-dalek, ed25519-dalek, hmac, rand, sha2, subtle, x25519-dalek, xsalsa20poly1305

Affects ssb-crypto::dalek

force_sodium = sodium
sodium force_sodium? = sodium_module
sodium_module sodium? = libsodium-sys, sodiumoxide

Affects ssb-crypto::sodium

b64 default alloc = base64
getrandom default = rand

Enables getrandom of rand ^0.7.3

rand:

Option: use getrandom package for seeding

Affects ephemeral::generate_ephemeral_keypair, sign::generate_keypair

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

libsodium-sys sodium_module?
sodiumoxide sodium_module?

Enables sodiumoxide

doesn't build on stable without "std"

base64 alloc b64

Enables base64 ^0.13.0

ed25519-dalek dalek_module?

Enables ed25519-dalek ^1.0.1

x25519-dalek dalek_module?

Enables x25519-dalek ^1.1.0

curve25519-dalek dalek_module?

Enables curve25519-dalek ^3.0.0

xsalsa20poly1305 dalek_module?

Enables xsalsa20poly1305 ^0.6.0

rand dalek_module? getrandom

Enables rand ^0.7.3

sha2 dalek_module?

Enables sha2 ^0.9.2

hmac dalek_module?

Enables hmac ^0.10.1

subtle dalek_module?