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

#604 in Algorithms

Download history 1803/week @ 2024-07-26 1749/week @ 2024-08-02 2349/week @ 2024-08-09 1437/week @ 2024-08-16 1763/week @ 2024-08-23 2170/week @ 2024-08-30 1038/week @ 2024-09-06 1351/week @ 2024-09-13 1787/week @ 2024-09-20 737/week @ 2024-09-27 845/week @ 2024-10-04 1456/week @ 2024-10-11 2654/week @ 2024-10-18 1784/week @ 2024-10-25 1367/week @ 2024-11-01 1080/week @ 2024-11-08

7,150 downloads per month
Used in 86 crates (4 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