[package]
edition = "2024"
rust-version = "1.85"
name = "digest"
version = "0.11.1"
authors = ["RustCrypto Developers"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Traits for cryptographic hash functions and message authentication codes"
documentation = "https://docs.rs/digest"
readme = "README.md"
keywords = [
"digest",
"crypto",
"hash",
]
categories = [
"cryptography",
"no-std",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/RustCrypto/traits"
[package.metadata.docs.rs]
all-features = true
[features]
alloc = []
block-api = ["dep:block-buffer"]
default = ["block-api"]
dev = ["blobby"]
getrandom = [
"common/getrandom",
"rand_core",
]
mac = ["dep:ctutils"]
oid = ["dep:const-oid"]
rand_core = ["common/rand_core"]
zeroize = [
"dep:zeroize",
"block-buffer?/zeroize",
]
[lib]
name = "digest"
path = "src/lib.rs"
[[test]]
name = "dummy_fixed"
path = "tests/dummy_fixed.rs"
[dependencies.blobby]
version = "0.4"
optional = true
[dependencies.block-buffer]
version = "0.12"
optional = true
[dependencies.common]
version = "0.2"
package = "crypto-common"
[dependencies.const-oid]
version = "0.10"
optional = true
[dependencies.ctutils]
version = "0.4"
optional = true
[dependencies.zeroize]
version = "1.7"
optional = true
default-features = false
[dev-dependencies.sha2]
version = "0.11.0-rc.5"
[lints.clippy]
borrow_as_ptr = "warn"
cast_lossless = "warn"
cast_possible_truncation = "warn"
cast_possible_wrap = "warn"
cast_precision_loss = "warn"
cast_sign_loss = "warn"
checked_conversions = "warn"
from_iter_instead_of_collect = "warn"
implicit_saturating_sub = "warn"
manual_assert = "warn"
map_unwrap_or = "warn"
missing_errors_doc = "warn"
missing_panics_doc = "warn"
mod_module_files = "warn"
must_use_candidate = "warn"
needless_range_loop = "allow"
ptr_as_ptr = "warn"
redundant_closure_for_method_calls = "warn"
ref_as_ptr = "warn"
return_self_not_must_use = "warn"
semicolon_if_nothing_returned = "warn"
std_instead_of_alloc = "warn"
std_instead_of_core = "warn"
trivially_copy_pass_by_ref = "warn"
undocumented_unsafe_blocks = "warn"
unnecessary_safety_comment = "warn"
unwrap_in_result = "warn"
unwrap_used = "warn"
[lints.rust]
missing_copy_implementations = "warn"
missing_debug_implementations = "warn"
missing_docs = "warn"
trivial_casts = "warn"
trivial_numeric_casts = "warn"
unused_lifetimes = "warn"
unused_qualifications = "warn"