dup-crypto 0.39.1

Manage cryptographic operations for DUniter Protocols and the Duniter eco-system most broadly.
Documentation
[package]
name = "dup-crypto"
version = "0.39.1"
authors = ["elois <c@elo.tf>"]
description = "Manage cryptographic operations for DUniter Protocols and the Duniter eco-system most broadly."
repository = "https://git.duniter.org/libs/dubp-rs-libs"
readme = "README.md"
keywords = ["keys", "cryptography", "duniter", "dunitrust"]
license = "AGPL-3.0"
edition = "2018"

[lib]
path = "src/lib.rs"

[dependencies]
aes = { version = "0.4.0", optional = true }
arrayvec = { version = "0.5.1", features = ["array-sizes-33-128", "array-sizes-129-255"], optional = true }
base64 = "0.12.3"
blake3 = "0.3.7"
bs58 = "0.3.0"
byteorder = "1.3.2"
curve25519-dalek = { version = "2.0.0", optional = true }
cryptoxide = { version = "0.3", optional = true }
ed25519-bip32 = { version = "0.3.2", optional = true }
once_cell = { version = "1.3.1", optional = true, default-features = false, features = ["std"] }
serde = { version = "1.0.114", features = ["derive"] }
thiserror = "1.0.11"
zerocopy = "0.3.0"
zeroize = { version = "1.1.0", features = ["zeroize_derive"] }

# Crypto backend depend on the target
[target.'cfg(target_arch = "wasm32")'.dependencies]
cryptoxide = "0.3"
getrandom = { version = "0.1.14", features = ["wasm-bindgen"] }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
ring = { version = "0.16.15" }

[dev-dependencies]
bincode = "1.2.0"
hex = "0.4.2"
sodiumoxide = "0.2.5"
unwrap = "1.2.1"

# Benches dependencies
criterion = { version = "0.3.1" }

[[bench]]
name = "ring_vs_sodium"
harness = false

[features]
default = ["rand"]
#default = ["rand", "bip32-ed25519"]
#default = ["dewif", "private_message", "pubkey_check", "rand", "mnemonic"]

bip32-ed25519 = ["cryptoxide", "ed25519-bip32"]
dewif = ["aes", "arrayvec", "scrypt"]
x25519 = ["curve25519-dalek", "pubkey_check"]
mnemonic = ["once_cell", "rand"]
private_message = ["arrayvec", "x25519", "rand"]
pubkey_check = ["curve25519-dalek"]
rand = []
scrypt = []

# mnemonic languages features (English is the default language, so always included)
mnemonic_all_languages = ["mnemonic_chinese_simplified", "mnemonic_chinese_traditional", "mnemonic_french", "mnemonic_italian", "mnemonic_japanese", "mnemonic_korean", "mnemonic_spanish"]
mnemonic_chinese_simplified = []
mnemonic_chinese_traditional = []
mnemonic_french = []
mnemonic_italian = []
mnemonic_japanese = []
mnemonic_korean = []
mnemonic_spanish = []

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]