[package]
edition = "2024"
rust-version = "1.85"
name = "sha2"
version = "0.11.0"
authors = ["RustCrypto Developers"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = """
Pure Rust implementation of the SHA-2 hash function family
including SHA-224, SHA-256, SHA-384, and SHA-512.
"""
documentation = "https://docs.rs/sha2"
readme = "README.md"
keywords = [
"sha2",
"hash",
"digest",
]
categories = [
"cryptography",
"no-std",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/RustCrypto/hashes"
[package.metadata.docs.rs]
all-features = true
[features]
alloc = ["digest/alloc"]
default = [
"alloc",
"oid",
]
oid = ["digest/oid"]
zeroize = ["digest/zeroize"]
[lib]
name = "sha2"
path = "src/lib.rs"
[[test]]
name = "mod"
path = "tests/mod.rs"
[[bench]]
name = "mod"
path = "benches/mod.rs"
[dependencies.cfg-if]
version = "1"
[dependencies.digest]
version = "0.11"
[dev-dependencies.digest]
version = "0.11"
features = ["dev"]
[dev-dependencies.hex-literal]
version = "1"
[target.'cfg(any(target_arch = "aarch64", target_arch = "x86_64", target_arch = "x86"))'.dependencies.cpufeatures]
version = "0.3"
[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = [
'cfg(sha2_backend, values("soft", "riscv-zknh"))',
'cfg(sha2_256_backend, values("aarch64-sha2", "soft", "riscv-zknh", "x86-sha"))',
'cfg(sha2_512_backend, values("aarch64-sha3", "soft", "riscv-zknh", "x86-avx2"))',
'cfg(sha2_backend_soft, values("compact"))',
'cfg(sha2_backend_riscv_zknh, values("compact"))',
]