#hash #belt #stb

no-std belt-hash

BelT hash function (STB 34.101.31-2020)

14 releases

Uses new Rust 2024

new 0.2.0-rc.5 Feb 2, 2026
0.2.0-rc.3 Nov 5, 2025
0.2.0-rc.0 May 29, 2025
0.2.0-pre.5 Mar 5, 2025
0.1.0 Sep 23, 2022

#2942 in Cryptography

Download history 7179/week @ 2025-10-13 6398/week @ 2025-10-20 3783/week @ 2025-10-27 2654/week @ 2025-11-03 12786/week @ 2025-11-10 11212/week @ 2025-11-17 5667/week @ 2025-11-24 3046/week @ 2025-12-01 3272/week @ 2025-12-08 5277/week @ 2025-12-15 4196/week @ 2025-12-22 3461/week @ 2025-12-29 9316/week @ 2026-01-05 6648/week @ 2026-01-12 5978/week @ 2026-01-19 8787/week @ 2026-01-26

31,489 downloads per month
Used in 9 crates

MIT/Apache

12KB
205 lines

RustCrypto: BelT hash

crate Docs Build Status Apache2/MIT licensed Rust Version Project Chat

Pure Rust implementation of the BelT hash function specified in STB 34.101.31-2020.

Examples

use belt_hash::{BeltHash, Digest};
use hex_literal::hex;

let mut hasher = BeltHash::new();
hasher.update(b"hello world");
let hash = hasher.finalize();

assert_eq!(hash, hex!("afb175816416fbadad4629ecbd78e1887789881f2d2e5b80c22a746b7ac7ba88"));

// Hex-encode hash using https://docs.rs/base16ct
let hex_hash = base16ct::lower::encode_string(&hash);
assert_eq!(hex_hash, "afb175816416fbadad4629ecbd78e1887789881f2d2e5b80c22a746b7ac7ba88");

Also, see the examples section in the RustCrypto/hashes readme.

License

The crate is licensed under either of:

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~740KB
~19K SLoC