5 unstable releases

0.3.1 Aug 10, 2022
0.3.0 Dec 8, 2020
0.2.1 Nov 11, 2020
0.2.0 Oct 15, 2020
0.1.0 Jan 20, 2020

#363 in Programming languages

Download history 1182/week @ 2023-12-23 1085/week @ 2023-12-30 1617/week @ 2024-01-06 1369/week @ 2024-01-13 2131/week @ 2024-01-20 1679/week @ 2024-01-27 1241/week @ 2024-02-03 531/week @ 2024-02-10 1526/week @ 2024-02-17 1364/week @ 2024-02-24 2208/week @ 2024-03-02 1347/week @ 2024-03-09 1832/week @ 2024-03-16 1759/week @ 2024-03-23 1503/week @ 2024-03-30 1222/week @ 2024-04-06

6,458 downloads per month
Used in 82 crates (3 directly)

MIT license

1MB
21K SLoC

blake2b-ref.rs

Crates.io

A no_std BLAKE2B crate.

This crate is transcompiled by c2rust; the source code is from the offcial BLAKE2 ref implementation. The transcompiled source has been modified slightly to support no_std.

The API design is highly inspired - almost copy from https://github.com/nervosnetwork/blake2b-rs.


lib.rs:

This crate is transcompiled from blake2b-ref

Example:

use blake2b_ref::Blake2bBuilder;

fn hash_message(msg: &[u8]) -> [u8; 32] {
    let mut output = [0u8; 32];
    let mut blake2b = Blake2bBuilder::new(32).personal(b"SMT").build();
    blake2b.update(msg);
    blake2b.finalize(&mut output);
    output
}

No runtime deps