8 releases (4 breaking)

Uses new Rust 2024

0.5.0 Feb 2, 2026
0.5.0-rc.0 Nov 10, 2025
0.4.0 Jan 27, 2025
0.3.2 Apr 15, 2023
0.1.0 Oct 30, 2018

#2152 in Algorithms

Download history 388021/week @ 2025-12-28 1040356/week @ 2026-01-04 1413336/week @ 2026-01-11 1521907/week @ 2026-01-18 1583252/week @ 2026-01-25 1584052/week @ 2026-02-01 1772636/week @ 2026-02-08 1543009/week @ 2026-02-15 1448011/week @ 2026-02-22 1917841/week @ 2026-03-01 1744345/week @ 2026-03-08 1488503/week @ 2026-03-15 1285727/week @ 2026-03-22 1325594/week @ 2026-03-29 1357788/week @ 2026-04-05 1303388/week @ 2026-04-12

5,405,679 downloads per month
Used in 12,365 crates (31 directly)

MIT/Apache

26KB
366 lines

rand_hc

Test Status Latest version Book API

A cryptographically secure random number generator that uses the HC-128 algorithm.

HC-128 is a stream cipher designed by Hongjun Wu[^1], that we use as an RNG. It is selected as one of the "stream ciphers suitable for widespread adoption" by eSTREAM[^2].

Links:

[^1]: Hongjun Wu (2008). "The Stream Cipher HC-128". The eSTREAM Finalists, LNCS 4986, pp. 39–47, Springer-Verlag.

[^2]: eSTREAM: the ECRYPT Stream Cipher Project

Crate Features

rand_hc is no_std compatible. It does not require any functionality outside of the core lib, thus there are no features to configure.

License

rand_hc is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT, and COPYRIGHT for details.

Dependencies

~40KB