Produce wrong result?
cuongleqq opened this issue · 1 comments
cuongleqq commented
I try with the text "foo"
var hash = new sha3_cpp.SHA3Hash(512);
hash.update("foo");
console.log(hash.digest('hex'))
The result is
1597842aac52bc9d13fe249d808afbf44da13524759477404c3592ee331173e89fe1cbf21a7e4360990d565fad4643cdb209d80fa41a91dea97e665022c92135
But the result on https://emn178.github.io/online-tools/sha512.html and also js-sha3 is
4bca2b137edc580fe50a88983ef860ebaca36c857b1f492839d6d7392452a63c82cbebc68e3b70a2a1480b4bb5d437a7cba6ecf9d89f9ff3ccd14cd6146ea7e7
Thanks
fanatid commented
@cuongle121 it's happened because node-sha3
produce hash for keccak
, not for sha3
.