leo/tests/compiler/stdlib/unstable_blake2s.leo

21 lines
404 B
Plaintext
Raw Normal View History

2021-05-19 20:53:41 +03:00
// namespace: Compile
// expectation: Pass
// inputs:
// - blake.in: |
// [main]
// message: [u8; 32] = [0; 32];
2021-05-03 16:47:33 +03:00
2021-05-19 20:53:41 +03:00
// [registers]
// r0: [u8; 32] = [0; 32];
2021-09-10 15:55:07 +03:00
import std.unstable.blake2s.Blake2s;
function main(message: [u8; 32]) -> [u8; 32] {
2021-05-03 16:47:33 +03:00
const seed: [u8; 32] = [1; 32];
let result = Blake2s::hash(seed, message);
console.log("Result: {}", result);
2021-05-03 16:47:33 +03:00
return result;
}