Skip to main content

streebog/
lib.rs

1#![no_std]
2#![doc = include_str!("../README.md")]
3#![doc(
4    html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg",
5    html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg"
6)]
7#![cfg_attr(docsrs, feature(doc_cfg))]
8#![forbid(unsafe_code)]
9#![warn(missing_docs, unreachable_pub)]
10
11pub use digest::{self, Digest};
12
13/// Block-level types
14pub mod block_api;
15mod consts;
16
17use block_api::StreebogVarCore;
18use digest::{
19    block_api::CtOutWrapper,
20    consts::{U32, U64},
21};
22
23digest::buffer_fixed!(
24    /// Streebog256 hasher.
25    pub struct Streebog256(CtOutWrapper<StreebogVarCore, U32>);
26    oid: "1.2.643.7.1.1.2.2";
27    impl: FixedHashTraits;
28);
29
30digest::buffer_fixed!(
31    /// Streebog512 hasher.
32    pub struct Streebog512(CtOutWrapper<StreebogVarCore, U64>);
33    oid: "1.2.643.7.1.1.2.3";
34    impl: FixedHashTraits;
35);