cardano_serialization_lib/
crypto.rs

1use cryptoxide::blake2b::Blake2b;
2
3pub(crate) fn blake2b224(data: &[u8]) -> [u8; 28] {
4    let mut out = [0; 28];
5    Blake2b::blake2b(&mut out, data, &[]);
6    out
7}
8
9pub(crate) fn blake2b256(data: &[u8]) -> [u8; 32] {
10    let mut out = [0; 32];
11    Blake2b::blake2b(&mut out, data, &[]);
12    out
13}
14
15// All key structs were taken from js-chain-libs:
16// https://github.com/Emurgo/js-chain-libs