# 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.88"
name = "purecrypto"
version = "0.6.18"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A pure-Rust cryptography toolkit with no foreign-code dependencies, from constant-time primitives up to keys, X.509 and TLS."
readme = "README.md"
keywords = [
    "crypto",
    "cryptography",
    "no-std",
    "constant-time",
]
categories = [
    "cryptography",
    "no-std::no-alloc",
]
license = "MIT"
repository = "https://github.com/KarpelesLab/purecrypto"

[features]
aez = [
    "cipher",
    "hash",
    "alloc",
]
alloc = []
ascon = [
    "hash",
    "cipher",
]
bignum = []
cert-compression = [
    "tls",
    "dep:compcol",
]
cipher = []
cli = [
    "std",
    "hash",
    "rng",
    "rsa",
    "ec",
    "der",
    "x509",
    "tls",
    "dtls",
    "quic",
    "kdf",
    "cipher",
    "ascon",
    "lms",
    "xmss",
    "embedded-roots",
]
default = [
    "std",
    "hash",
    "cipher",
    "kdf",
    "bignum",
    "rng",
    "rsa",
    "der",
    "dh",
    "x509",
    "pkcs12",
    "ec",
    "tls",
    "dtls",
    "mlkem",
    "mldsa",
    "slhdsa",
    "ascon",
    "aez",
    "lms",
    "xmss",
    "mac",
    "cert-compression",
    "embedded-roots",
    "cli",
    "linux-getrandom",
]
der = []
dh = [
    "bignum",
    "rng",
    "alloc",
]
dtls = ["tls"]
ec = [
    "bignum",
    "rng",
    "hash",
    "alloc",
]
ech = [
    "tls",
    "hpke",
]
embedded-roots = [
    "tls",
    "dep:cacrt",
]
falcon = [
    "hash",
    "alloc",
    "rng",
]
ffi = [
    "std",
    "hash",
    "rng",
    "rsa",
    "ec",
    "der",
    "x509",
    "tls",
    "dtls",
    "quic",
    "mldsa",
    "slhdsa",
    "mlkem",
    "kdf",
    "cipher",
    "ascon",
    "lms",
    "xmss",
]
hash = []
hazmat-edwards25519 = ["ec"]
hazmat-mldsa = ["mldsa"]
hazmat-secp256k1 = ["ec"]
hpke = [
    "hash",
    "kdf",
    "ec",
    "cipher",
    "rng",
    "alloc",
]
kdf = [
    "hash",
    "cipher",
]
linux-getrandom = [
    "rng",
    "std",
]
lms = [
    "hash",
    "rng",
    "alloc",
]
mac = ["cipher"]
mio = [
    "tls",
    "std",
    "dep:mio",
]
mldsa = [
    "hash",
    "rng",
    "alloc",
]
mlkem = [
    "hash",
    "rng",
]
pkcs12 = [
    "x509",
    "kdf",
    "cipher",
    "der",
    "alloc",
]
quic = [
    "tls",
    "std",
]
ristretto255 = [
    "ec",
    "hash",
    "rng",
]
rng = ["hash"]
rsa = [
    "bignum",
    "rng",
    "hash",
]
slhdsa = [
    "hash",
    "rng",
    "alloc",
]
std = ["alloc"]
tls = [
    "cipher",
    "hash",
    "kdf",
    "ec",
    "rsa",
    "x509",
    "der",
    "rng",
    "mlkem",
    "alloc",
]
tls-legacy = ["tls"]
tokio = [
    "tls",
    "std",
    "dep:tokio",
]
x509 = [
    "der",
    "rsa",
    "hash",
    "alloc",
    "ec",
]
xmss = [
    "hash",
    "rng",
    "alloc",
]

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

[[bin]]
name = "purecrypto"
path = "src/bin/purecrypto/main.rs"
required-features = ["cli"]

[[example]]
name = "bench"
path = "examples/bench.rs"
required-features = [
    "std",
    "cipher",
    "hash",
    "ec",
    "rsa",
    "mlkem",
    "aez",
]

[[example]]
name = "pss_interop"
path = "examples/pss_interop.rs"

[[example]]
name = "selfsigned_cert"
path = "examples/selfsigned_cert.rs"

[[example]]
name = "tls_ech_loopback"
path = "examples/tls_ech_loopback.rs"
required-features = ["ech"]

[[example]]
name = "tls_external_signing"
path = "examples/tls_external_signing.rs"
required-features = ["tls"]

[[example]]
name = "tls_get"
path = "examples/tls_get.rs"

[[example]]
name = "tls_legacy_interop"
path = "examples/tls_legacy_interop.rs"
required-features = [
    "tls-legacy",
    "std",
]

[[example]]
name = "tls_loopback"
path = "examples/tls_loopback.rs"

[[example]]
name = "tls_private_key_driven"
path = "examples/tls_private_key_driven.rs"
required-features = [
    "tls",
    "std",
]

[[test]]
name = "cli"
path = "tests/cli.rs"

[[test]]
name = "mio_surface"
path = "tests/mio_surface.rs"

[[test]]
name = "tokio_surface"
path = "tests/tokio_surface.rs"

[dependencies.cacrt]
version = "0.1"
optional = true
default-features = false

[dependencies.compcol]
version = "0.4"
features = ["zlib"]
optional = true
default-features = false

[dependencies.mio]
version = "1"
features = [
    "os-ext",
    "net",
]
optional = true
default-features = false

[dependencies.tokio]
version = "1"
features = [
    "net",
    "io-util",
]
optional = true
default-features = false

[dev-dependencies.tokio]
version = "1"
features = [
    "net",
    "io-util",
    "rt",
    "macros",
    "time",
]

[lints.rust]
missing_docs = "warn"
unreachable_pub = "warn"
unsafe_code = "deny"

[profile.release]
lto = "thin"
