This is a wasm version of rescue-hash.
- It can do standardized rescue hash for 2 data. Such as Hash(A,B) => C (A,B and C shoud be
[u64;4]
, each data should contain 4u64
elements). - It can do rescue hash consecutively, in other word, it can Hash(A,B,C,D,....) => Hash(A,(B,(C,D)...)) Each data should contain 4
u64
elements as well).
The inputs
specifies the rescue input, it should contain 8 elements or more(over 8 but should be some multiple of 4);
The outputs
is the rescue result, which contains 4 elements as Vec<u64>
.
Run the following commands:
wasm-pack build --target web
python -m http.server 8008
And then you could see the hash result through your browser at http://localhost:8008/
Run the following commands:
wasm-pack build --target nodejs
Move the pkg file to the workspace and run:
npm install ./pkg
and then you can use this rescue as a module.