spacedrive/crates/crypto/Cargo.toml
Oscar Beaumont 85d0ddf6d3
rspc 0.1.3 prep (#756)
* Upgrade rspc + Specta + PCR

* fix jsonrpc executor

* fix invalidate excessive logging

* fix `Protected` type

* fix mobile

* clippy

* lol
2023-04-25 15:14:52 +08:00

71 lines
1.9 KiB
TOML

[package]
name = "sd-crypto"
version = "0.0.0"
authors = ["Jake Robinson <jake@spacedrive.com>"]
readme = "README.md"
description = "A library to handle cryptographic functions within Spacedrive"
edition = "2021"
rust-version = "1.67.0"
[features]
rspc = ["dep:rspc", "dep:specta"]
specta = ["dep:specta"]
serde = ["dep:serde", "dep:serde_json", "dep:serde-big-array", "uuid/serde"]
keymanager = ["dep:dashmap", "os-keyrings"]
os-keyrings = ["dep:secret-service", "dep:security-framework"]
[dependencies]
# rng
rand = "0.8.5"
rand_chacha = "0.3.1"
# hashing
argon2 = "0.5.0"
balloon-hash = "0.4.0"
blake3 = { version = "1.3.3", features = ["traits-preview"] }
# aeads
aes-gcm = "0.10.1"
chacha20poly1305 = "0.10.1"
aead = { version = "0.5.1", features = ["stream"] }
# cryptographic hygiene
zeroize = "1.5.7"
# error handling
thiserror = "1.0.37"
# metadata de/serialization
serde = { version = "1.0", features = ["derive"], optional = true }
serde_json = { version = "1.0", optional = true }
serde-big-array = { version = "0.5.1", optional = true }
# for storedkey organisation and handling
uuid = { version = "1.1.2", features = ["v4"] }
# better concurrency for the keymanager
dashmap = { version = "5.4.0", optional = true }
# optional, for support with rspc
rspc = { workspace = true, features = [], optional = true }
specta = { workspace = true, features = ["uuid"], optional = true }
# for asynchronous crypto
tokio = { workspace = true, features = ["io-util", "rt-multi-thread", "sync"] }
hex = "0.4.3"
# linux OS keyring - using `v2.0.2` as newer versions broke a lot due to async/lifetimes
[target.'cfg(target_os = "linux")'.dependencies]
secret-service = { version = "2.0.2", optional = true }
# macos/ios OS keyring
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies]
security-framework = { version = "2.8.1", optional = true }
[dev-dependencies]
tokio = { workspace = true, features = [
"fs",
"macros",
] } # features needed for examples