Sha256: 875ad0e27d5e12374399ba04b40c7d88acee946097a308ef4e13f7be0cd792bd

Contents?: true

Size: 1.1 KB

Versions: 65

Compression:

Stored size: 1.1 KB

Contents

# sha.js

Streamable SHA1 hash in pure javascript.

[![build status](https://secure.travis-ci.org/dominictarr/sha.js.png)](http://travis-ci.org/dominictarr/sha.js)

[![testling badge](https://ci.testling.com/dominictarr/sha.js.png)](https://ci.testling.com/dominictarr/sha.js)

## Example

``` js
var createHash = require('sha.js')

var sha1 = createHash('sha1')
var sha256 = createHash('sha256')
var sha512 = createHash'sha512')

var h = sha1.update('abc', 'utf8').digest('hex')
console.log(h) //a9993e364706816aba3e25717850c26c9cd0d89d
```

## supported hashes

sha.js currently implements:

* sha1
* sha256
* sha512

## Note

Note, this doesn't actually implement a stream, but wrapping this in a stream is trivial.
but is does update incrementally, so you can hash things larger than ram, and also, since it reuses
the typedarrays, it uses a constant amount of memory (except when using base64 or utf8 encoding,
see code comments)


## Acknowledgements

This work is derived from Paul Johnston's ["A JavaScript implementation of the Secure Hash Algorithm"]
(http://pajhome.org.uk/crypt/md5/sha1.html)



## License

MIT

Version data entries

65 entries across 65 versions & 2 rubygems

Version Path
gulp_assets-1.0.0.pre.5 template/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/sha.js/README.md
gulp_assets-1.0.0.pre.4 template/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/sha.js/README.md
gulp_assets-1.0.0.pre.3 template/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/sha.js/README.md
smock-0.1.268 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/sha.js/README.md
smock-0.1.267 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/sha.js/README.md
smock-0.1.266 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/sha.js/README.md
smock-0.1.265 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/sha.js/README.md
smock-0.1.264 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/sha.js/README.md
smock-0.1.263 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/sha.js/README.md
smock-0.1.262 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/sha.js/README.md
smock-0.1.261 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/sha.js/README.md
smock-0.1.260 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/sha.js/README.md
smock-0.1.259 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/sha.js/README.md
smock-0.1.258 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/sha.js/README.md
smock-0.1.256 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/sha.js/README.md
smock-0.1.255 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/sha.js/README.md
smock-0.1.254 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/sha.js/README.md
smock-0.1.253 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/sha.js/README.md
smock-0.1.252 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/sha.js/README.md
smock-0.1.251 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/sha.js/README.md