[workspace] package.version = "0.9.1" members = [ "cli", "ffi", "fuzz", "python", ] [package] name = "devolutions-crypto" version.workspace = true authors = ["Philippe Dugre ", "Mathieu Morrissette "] edition = "2021" readme = "README_RUST.md" license = "MIT OR Apache-2.0" homepage = "https://github.com/devolutions/devolutions-crypto" repository = "https://github.com/devolutions/devolutions-crypto" description = "An abstraction layer for the cryptography used by Devolutions" resolver = "2" [lib] name = "devolutions_crypto" crate-type = ["cdylib", "rlib"] [dependencies] aead = "0.5" aes = "0.8" base64 = "0.22" cbc = { version = "0.1.2", features = ["block-padding", "alloc"] } byteorder = "1" chacha20poly1305 = "0.10" cfg-if = "1" hmac = "0.12" num_enum = "0.7" pbkdf2 = { version = "0.12", default-features = false } scrypt = { version = "0.11", default-features = false } sharks = "0.5" sha2 = "0.10" strum = { version = "0.26", features = ["derive"] } subtle = "2" zeroize = { version = "1.8" } rand = "0.8" rand_core = { version = "0.6" } ed25519-dalek = { version = "2", features = [ "rand_core" ] } x25519-dalek = { version = "2", features = [ "static_secrets" ] } # used for fuzzing # Version is pinned because newer version requires lifetime annotations # that isn't compatible with the header trait arbitrary = { version = "0.4.7", features = ["derive"], optional = true } [target.'cfg(target_arch="wasm32")'.dependencies] rust-argon2 = { version = "1.0", default-features = false } wasm-bindgen = { version = "0.2.92", optional = true } serde-wasm-bindgen = { version = "0.6.5", optional = true } js-sys = { version = "0.3.69", optional = true } # FIXME: https://docs.rs/getrandom/0.2.2/getrandom/#webassembly-support # let `getrandom` know that JavaScript is available for our targets # `getrandom` is not used directly, but by adding the right feature here # it will be compiled with it in our dependencies as well (since union of # all the features selected is used when building a Cargo project) getrandom = { version = "0.2", features = ["js", "wasm-bindgen"] } [target.'cfg(not(target_arch="wasm32"))'.dependencies] rust-argon2 = "1.0" [target.'cfg(target_arch="wasm32")'.dev-dependencies] wasm-bindgen-test = "0.3" [features] default = [] fuzz = ["arbitrary", "sharks/fuzzing"] wbindgen = ["wasm-bindgen", "serde-wasm-bindgen", "js-sys"]