bash-hash 0.1.0

bash hash function (STB 34.101.77-2020)
Documentation
#![no_std]
#![doc = include_str!("../README.md")]
#![doc(
    html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg",
    html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg"
)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![warn(missing_docs, unreachable_pub)]
#![forbid(unsafe_code)]

use digest::typenum::{U32, U48, U64};
pub use digest::{self, Digest};

/// Block-level types
pub mod block_api;
#[cfg(feature = "oid")]
mod oids;
mod serialize;
mod variants;

pub use variants::OutputSize;

digest::buffer_fixed!(
    /// `bash-hash` hasher state generic over output size.
    pub struct BashHash<OS: OutputSize>(block_api::BashHashCore<OS>);
    // note: `SerializableState` is implemented in the `serialize` module
    // to work around issues with complex trait bounds
    impl: BaseFixedTraits AlgorithmName Default Clone HashMarker
        Reset FixedOutputReset ZeroizeOnDrop;
);

/// `bash-hash-256` hasher state.
pub type BashHash256 = BashHash<U32>;
/// `bash-hash-384` hasher state.
pub type BashHash384 = BashHash<U48>;
/// `bash-hash-512` hasher state.
pub type BashHash512 = BashHash<U64>;