JsSHA Versions Save

A JavaScript/TypeScript implementation of the complete Secure Hash Standard (SHA) family (SHA-1, SHA-224/256/384/512, SHA3-224/256/384/512, SHAKE128/256, cSHAKE128/256, and KMAC128/256) with HMAC.

v3.3.1

2 months ago
  • Support latest method of defining type imports (#103, thanks @faljse!).

v3.3.0

1 year ago
  • .update() method now returns a reference to the jsSHA object to allow for method chaining (#100, thanks @ADTC!).
  • Correct bad URL in README (#99, thanks @jbjulia!).

v3.2.0

3 years ago

Changelog for this release:

  • Added ESM versions of all variants (thanks wKovacs64!).

v3.1.2

3 years ago

Changelog for this release:

  • Added explicit package.json export to support React (thanks canpoyrazoglu!).

v3.1.1

3 years ago

Changelog for this release:

  • Added dist subpath exports to provide forward compatibility with newer node versions (thanks aravinth2094!).

v3.1.0

4 years ago

Changelog for this release:

  • Added support for cSHAKE128/256 and KMAC128/256 (thanks paulg446 for the ticket and mrecachinas for the test vector help!).
  • Added TypeScript declarations for all variant files (thanks wKovacs64!).
  • Deprecated setHMACKey and getHMAC in order to unify MAC API. See the [jsSHA Wiki] for more information.

v3.0.0

4 years ago

Changelog for this release:

  • Transitioned codebase to TypeScript while still maintaining v2 backwards compatible output files (thanks for the solid start oberondelafay!).
  • v2 backwards compatible files now use the Universal Module Definition (UMD) format which should support all well-known loaders.
  • Added a oft-requested ECMAScript 2015 (ES6) ECMAScript Module (ESM) version of the library (dist/sha.mjs).
  • Reworked package exports to allow Node.js and other tools to smartly choose between ES6 ESM module and ES3 UMD versions of the library.
  • TypeScript declarations are now included with the library for the default entry points (dist/sha.js and dist/sha.mjs).
  • Source maps are now included with the library for the default entry points.
  • Limited hash variant files (sha1.js, sha256.js, sha512.js, and sha3.js) are now accessed via exports rather than file path (e.g. using require("jssha/sha1") rather than the previous require("jssha/src/sha1.js").
  • Changed build system from Google Closure Compiler to Rollup with terser as the minifier/uglifer (thanks blikblum!). This resulted in slightly larger output files but infinitely better maintainability.
  • Optimized 64-bit functions by removing unneeded logical/arithmetic/bit operations.
  • Completely overhauled testing due to transition to TypeScript. This resulted in the ability to get true 100% unit test coverage and identification of a few lurking/obscure bugs (see v2.4.2 and v2.4.1).

v2.4.2

4 years ago

This marks the last v2.X feature release. The codebase is transitioning to TypeScript and, while the API is intended to be fully backwards-compatible, the version will be bumped to v3 as a safety precaution.

Changelog for this release:

  • Fixed incorrect SHAKE128 results when output length was greater than 1344-bits and SHAKE256 results when output length was greater than 1088-bits (1344 and 1088 being internal state size for each variant).

v2.4.1

4 years ago

Changelog for this release:

  • Fixed incorrect HMAC results when using SHA-3 if the key was 1-4 bytes shorter than the internal block size of the chosen SHA-3 variant.

v2.4.0

4 years ago

Changelog for this release:

  • Reduced ECMAScript dependency to v3 (thanks TitusInfo!)
  • Added support for Uint8Array input/output as UINT8ARRAY (thanks nazar-pc!)