jsSHA

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.

BSD-3-CLAUSE License

Downloads
3.5M
Stars
2.2K
Committers
15

Bot releases are hidden (Show)

jsSHA - Release version v3.3.1 Latest Release

Published by Caligatio 7 months ago

  • Support latest method of defining type imports (#103, thanks @faljse!).
jsSHA - Release version v3.3.0

Published by Caligatio about 2 years 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!).
jsSHA - Release version 3.2.0

Published by Caligatio almost 4 years ago

Changelog for this release:

  • Added ESM versions of all variants (thanks wKovacs64!).
jsSHA - Release version 3.1.2

Published by Caligatio about 4 years ago

Changelog for this release:

  • Added explicit package.json export to support React (thanks canpoyrazoglu!).
jsSHA - Release version 3.1.1

Published by Caligatio about 4 years ago

Changelog for this release:

  • Added dist subpath exports to provide forward compatibility with newer node versions (thanks aravinth2094!).
jsSHA - Release version 3.1.0

Published by Caligatio over 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.
jsSHA - Release version 3.0.0

Published by Caligatio over 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).
jsSHA - Release version 2.4.2

Published by Caligatio over 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).
jsSHA - Release version 2.4.1

Published by Caligatio over 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.
jsSHA - Release version 2.4.0

Published by Caligatio over 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!)
jsSHA - Release version 1.6.3

Published by Caligatio over 4 years ago

Changelog for this release:

  • Reduced ECMAScript dependency to v3 (thanks TitusInfo!)
jsSHA - Release version 2.3.1

Published by Caligatio over 7 years ago

Changelog for this release:

  • Fix issue with SHA-3 and using a combination of TEXT/UTF-16 input (thanks frostschutz!)
jsSHA - Release version 2.3.0

Published by Caligatio over 7 years ago

Changelog for this release:

  • Sped up SHA-3 implementation by adding little-endian capability to
    conversion functions
  • Further sped up SHA-3 implementation by decomposing xor_64 function
    (thanks frostschutz!)
  • Fixed incorrect results when using ArrayBuffers (thanks conref!)
  • Added externs/sha.js for Google Closure Compiler users (thanks IvanRF!)
jsSHA - Release version 2.2.0

Published by Caligatio over 8 years ago

Changelog for this release:

  • Added support for the SHA-3 family of hashes (SHA3-224, SHA3-256,
    SHA3-384, SHA3-512, SHAKE128, and SHAKE256)
  • Fixed bug with using ARRAYBUFFER as a HMAC key type
  • Switched testing framework to Mocha and Chai
jsSHA - Release version 2.1.0

Published by Caligatio over 8 years ago

Changelog for this release:

  • Added ability to call update on hashes between getHash and getHMAC calls
  • Added new input and output type, "ARRAYBUFFER" which is a JavaScript ArrayBuffer
  • Now keeping smaller build files in NPM (thanks vogievetsky!)
  • Fixed problem with hashing strings over 4 billion bits (thanks Eicar!)
jsSHA - Release version 1.6.2

Published by Caligatio over 8 years ago

Changelog for this release:

  • Fixed problem with hashing strings over 4 billion bits (thanks Eicar!)
jsSHA - Release version 2.0.2

Published by Caligatio almost 9 years ago

Changelog for this release:

  • Fixed inability to have a blank "b64Pad" (thanks xlc!)
  • Added file hashing test (thanks kofalt!)
jsSHA - Release version 1.6.1

Published by Caligatio over 9 years ago

Changelog for this release:

  • Fixed issue with SHA-512 family of hashes failing is raw input was a particular size
jsSHA - Release version 2.0.1

Published by Caligatio over 9 years ago

Changelog for this release:

  • Fixed major issue with all hashes failing if raw input was a particular size (thanks treus!)
jsSHA - Release version 2.0.0

Published by Caligatio over 9 years ago

Changelog for this release:

  • Completely reworked API to support streaming inputs
  • Exceptions now throw Errors instead of strings (thanks jclem!)