2021-05-03 16:47:33 +03:00
|
|
|
/*
|
|
|
|
namespace: Compile
|
|
|
|
expectation: Pass
|
|
|
|
inputs:
|
|
|
|
- blake.in: |
|
|
|
|
[constants]
|
|
|
|
message: [u8; 32] = [0; 32];
|
|
|
|
|
|
|
|
[registers]
|
|
|
|
r0: [u8; 32] = [0; 32];
|
|
|
|
*/
|
2020-09-16 23:41:50 +03:00
|
|
|
|
2021-05-03 16:47:33 +03:00
|
|
|
import core.unstable.blake2s.Blake2s;
|
2020-09-16 23:41:50 +03:00
|
|
|
|
2021-05-03 16:47:33 +03:00
|
|
|
function main(const message: [u8; 32]) -> [u8; 32] {
|
|
|
|
const seed: [u8; 32] = [1; 32];
|
2021-03-18 22:19:07 +03:00
|
|
|
const result = Blake2s::hash(seed, message);
|
2020-09-16 23:41:50 +03:00
|
|
|
|
|
|
|
console.log("Result: {}", result);
|
2021-05-03 16:47:33 +03:00
|
|
|
|
|
|
|
return result;
|
2020-09-16 23:41:50 +03:00
|
|
|
}
|