create-hash
Advanced tools
Comparing version 1.0.2 to 1.1.0
{ | ||
"name": "create-hash", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "create hashes for browserify", | ||
"browser": "create-hash.js", | ||
"browser": "browser.js", | ||
"main": "index.js", | ||
@@ -12,3 +12,3 @@ "scripts": { | ||
"type": "git", | ||
"url": "git@github.com:crypto-browserify/crypto-createHash.git" | ||
"url": "git@github.com:crypto-browserify/createHash.git" | ||
}, | ||
@@ -21,5 +21,5 @@ "keywords": [ | ||
"bugs": { | ||
"url": "https://github.com/crypto-browserify/crypto-createHash/issues" | ||
"url": "https://github.com/crypto-browserify/createHash/issues" | ||
}, | ||
"homepage": "https://github.com/crypto-browserify/crypto-createHash", | ||
"homepage": "https://github.com/crypto-browserify/createHash", | ||
"devDependencies": { | ||
@@ -26,0 +26,0 @@ "hash-test-vectors": "^1.3.2", |
create-hash | ||
=== | ||
[](https://travis-ci.org/crypto-browserify/crypto-createHash) | ||
[](https://travis-ci.org/crypto-browserify/createHash) | ||
Node style hashes for use in the browser. | ||
Node style hashes for use in the browser, with native has functions in node. Api is the same as hashes in node: | ||
```js | ||
var createHash = require('create-hash'); | ||
var hash = createHash('sha224'); | ||
hash.update('synchronous write'); //optional encoding parameter | ||
hash.digest();// synchronously get result with optional encoding parameter | ||
hash.write('write to it as a stream'); | ||
hash.end();//remember it's a stream | ||
hash.read();//only if you ended it as a stream though | ||
``` | ||
To get the JavaScript version even in node do `require('create-hash/browser');` |
@@ -8,3 +8,3 @@ var fs = require('fs') | ||
var createHash = require('./create-hash') | ||
var createHash = require('./browser') | ||
@@ -11,0 +11,0 @@ algorithms.forEach(function (algorithm) { |
11025
19