[package]
name = "oxicrypto-hash"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
description = "Pure Rust hash implementations for OxiCrypto (SHA-2, SHA-3, BLAKE3)"
keywords = ["cryptography", "hash", "sha2", "sha3", "blake3"]
categories = ["cryptography"]

[features]
default = []
std = ["blake3/std", "oxicrypto-core/std"]
## Opt-in to a fully alloc-free API surface.
##
## When `no_std` is enabled:
## - `hash_to_vec`, `blake3_xof`, `parallel_hash*_xof` are NOT available
##   (they require heap allocation via `extern crate alloc`).
## - Use the inherent `hash_fixed::<N>()` methods on concrete hash types
##   (e.g. `Sha256::hash_fixed`, `Blake3::hash_fixed`) instead, which write
##   into a fixed-size `[u8; N]` on the stack without any heap allocation.
## - The `Hash::hash_to_array::<N>()` method from `oxicrypto-core` is also
##   always available as an alloc-free alternative to `hash_to_vec`.
no_std = []

[dependencies]
oxicrypto-core.workspace = true
sha2 = { workspace = true, features = ["alloc"] }
sha3 = { workspace = true, features = ["alloc"] }
blake2 = { workspace = true, features = ["alloc"] }
blake3.workspace = true
digest = { workspace = true, features = ["alloc"] }
shake.workspace = true
cshake.workspace = true

[dev-dependencies]
hex.workspace = true
