# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.95.0"
name = "affinidi-crypto"
version = "0.2.4"
authors = ["Glenn Gore <glenn@affinidi.com>"]
build = false
publish = true
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Cryptographic primitives and JWK types for Affinidi TDK"
homepage = "https://affinidi.com/"
readme = "README.md"
keywords = [
    "ssi",
    "affinidi",
]
license = "Apache-2.0"
repository = "https://github.com/affinidi/affinidi-tdk-rs"

[features]
default = [
    "p256",
    "k256",
    "p384",
    "p521",
    "ed25519",
]
ed25519 = ["dep:ed25519-dalek"]
jose = [
    "dep:aes",
    "dep:cbc",
    "dep:hmac",
    "dep:subtle",
    "ed25519",
    "p256",
    "k256",
    "p384",
    "p521",
]
k256 = ["dep:k256"]
ml-dsa = [
    "dep:ml-dsa",
    "dep:rand_10",
]
p256 = ["dep:p256"]
p384 = ["dep:p384"]
p521 = ["dep:p521"]
post-quantum = [
    "ml-dsa",
    "slh-dsa",
]
slh-dsa = [
    "dep:slh-dsa",
    "dep:rand_10",
]

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

[dependencies.aes]
version = "0.8"
optional = true

[dependencies.affinidi-encoding]
version = "0.1.4"

[dependencies.base58]
version = "0.2"

[dependencies.base64]
version = "0.22"

[dependencies.cbc]
version = "0.1"
features = ["alloc"]
optional = true

[dependencies.ed25519-dalek]
version = "2"
features = ["rand_core"]
optional = true

[dependencies.hmac]
version = "0.12"
optional = true

[dependencies.k256]
version = "0.13"
features = [
    "ecdsa-core",
    "arithmetic",
    "ecdh",
]
optional = true

[dependencies.ml-dsa]
version = "0.1.0"
features = [
    "rand_core",
    "zeroize",
]
optional = true

[dependencies.multibase]
version = "0.9"

[dependencies.p256]
version = "0.13"
features = [
    "ecdsa-core",
    "ecdsa",
    "arithmetic",
    "ecdh",
]
optional = true

[dependencies.p384]
version = "0.13"
features = [
    "ecdsa-core",
    "arithmetic",
    "ecdh",
]
optional = true

[dependencies.p521]
version = "0.13"
features = [
    "arithmetic",
    "ecdh",
]
optional = true

[dependencies.rand_10]
version = "0.10"
features = [
    "std",
    "std_rng",
    "sys_rng",
]
optional = true
default-features = false
package = "rand"

[dependencies.rand_core]
version = "0.6"
features = ["getrandom"]

[dependencies.serde]
version = "1"
features = ["derive"]

[dependencies.serde_json]
version = "1"

[dependencies.sha2]
version = "0.10"

[dependencies.slh-dsa]
version = "=0.2.0-rc.5"
features = ["zeroize"]
optional = true

[dependencies.subtle]
version = "2"
optional = true

[dependencies.thiserror]
version = "2"

[dependencies.x25519-dalek]
version = "2"
features = ["static_secrets"]

[dependencies.zeroize]
version = "1"

[target.'cfg(target_arch = "wasm32")'.dependencies.getrandom]
version = "0.2"
features = ["js"]

[lints.clippy]
uninlined_format_args = "warn"
