SHA-256 implementation extracted from digitalbazaar/forge
Switch branches/tags
Nothing to show
Clone or download
brillout Merge pull request #2 from Rosuav/add-license-terms
Add a LICENSE file detailing license terms.
Latest commit 6ad5535 Jul 5, 2017

README.md

Reason to use this instead of the official forge build:

  • drastic size reduction by pruning all unecessary code for SHA-256, from 284 KB to 4.5 KB
  • automatically sets right encoding

Code at forge/* extracted from forge's master of July 2015.

Usage

<script src='build/forge-sha256.min.js'></script>
<script>
console.log(forge_sha256('abc'));
// prints ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
</script>

forge_sha256() supports wide characters.