0.1.1 • Published 2 years ago
unrolled-nbl-hashes-sha3 v0.1.1
unrolled-nbl-hashes-sha3
To reproduce, fork @noble/hashes:
sha3.ts
: ReplacekeccakP
with this: https://gist.github.com/paulmillr/6f70a166ed0023b3357925bdb091908a.- You can leave it as-is, which will violate CSP
- Or, you can compile it once, add
console.log(keccakP.toString())
to the file, runnode sha3.js
, which will print "constructed" function to console output, and then copy-paste the output, and replace the function for real.
utils.ts
: Comment-out// import { crypto } from '@noble/hashes/crypto';
andrandomBytes
. This is done to reduce side-effects and bundle size, since we are not using the function at all.rollup.js
: adjust config to build output file:export { sha3_224, sha3_256, sha3_384, sha3_512, keccak_224, keccak_256, keccak_384, keccak_512, } from '@noble/hashes/sha3';
npm run build && npm run build:release
, then seebuild/noble-hashes.js