uhash-core 0.5.1

UniversalHash v4 - democratic proof-of-work algorithm where phones compete with servers
Documentation
//! # uhash-core
//!
//! UniversalHash v4 — democratic proof-of-work hash engine.
//!
//! ## Primary API
//!
//! - [`hash`] — one-shot hash function
//! - [`UniversalHash`] — reusable hasher (avoids re-allocation)
//! - [`meets_difficulty`] / [`verify`] — proof verification
//! - [`build_input`] / [`challenge_input`] — challenge utilities
//!
//! ## no_std Support
//!
//! This crate supports `no_std` environments with the `alloc` crate:
//!
//! ```toml
//! [dependencies]
//! uhash-core = { version = "0.3", default-features = false }
//! ```

#![cfg_attr(not(feature = "std"), no_std)]

#[cfg(not(feature = "std"))]
extern crate alloc;

mod challenge;
mod hash;
mod params;
mod primitives;
mod verify;

#[cfg(feature = "std")]
mod ffi;

// Primary public API — hash engine
pub use hash::{hash, UniversalHash};

// Verification
pub use verify::{meets_difficulty, verify};

// Challenge utilities
pub use challenge::{build_input, challenge_input, encode_difficulty};

// Algorithm parameters
pub use params::*;

#[cfg(test)]
mod tests;