0.1.1 • Published 2 years ago

unrolled-nbl-hashes-sha3 v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

unrolled-nbl-hashes-sha3

To reproduce, fork @noble/hashes:

  1. sha3.ts: Replace keccakP 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, run node sha3.js, which will print "constructed" function to console output, and then copy-paste the output, and replace the function for real.
  2. utils.ts: Comment-out // import { crypto } from '@noble/hashes/crypto'; and randomBytes. This is done to reduce side-effects and bundle size, since we are not using the function at all.
  3. 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';
  4. npm run build && npm run build:release, then see build/noble-hashes.js

0.1.1

2 years ago

0.1.0

2 years ago