dup-crypto 0.27.0

Manage cryptographic operations for DUniter Protocols and the Duniter eco-system most broadly.
Documentation
[package]
name = "dup-crypto"
version = "0.27.0"
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.11.0"
bs58 = "0.3.0"
byteorder = "1.3.2"
curve25519-dalek = { version = "2.0.0", optional = true }
serde = { version = "1.0.114", features = ["derive"] }
thiserror = "1.0.11"
zeroize = { version = "1.1.0", features = ["zeroize_derive"] }

# Crypto backend depend on the target
[target.'cfg(target_arch = "wasm32")'.dependencies]
cryptoxide = "0.2.1"
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"
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 = ["dewif", "private_message", "pubkey_check", "rand"]

dewif = ["aes", "arrayvec", "scrypt"]
x25519 = ["curve25519-dalek", "pubkey_check"]
private_message = ["arrayvec", "x25519", "rand"]
pubkey_check = ["curve25519-dalek"]
rand = []
scrypt = []