Audited & minimal JS implementation of hash functions, MACs and KDFs.
- [x] **Remove cryptoNode import!** Requires to ditch support for nodejs v18 (EOL 30 Apr 2025) - [x] Test in bundler-less browser - [x] Change `@noble/hashes/sha3` to `@noble/hashes/sha3.js` - Import maps are not browser-friendly etc - Before doing this, actually test in real browser - [x] Remove support for hashing strings, only allow uint8arrays (see below) - [x] Remove sha256, sha512 (use sha2 now) Maybe also: - Make package ESM-only - Add root imports - rename crypto / cryptoNode => webcrypto (to match noble-ciphers) - blake2b, blake2s, blake3 => blake? - ripemd160 => ripemd? Curves: https://github.com/paulmillr/noble-curves/issues/142 --- Uint8Array [now has fromHex](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array/fromHex). Right now we accept Hex strings or Uint8Array. It is safer to only allow Uint8Array inputs by default. String encoding is useful. We can add the following api: ```js sha256(new Uint8Array(5)); sha256.fromHex('cafe'); sha256.fromUtf8('cafe'); ```
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be resolved. The issue was opened by paulmillr and has received 24 comments.