Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
9746709aab | |||
2c4e09cf88 | |||
088b5259b5 | |||
a8c1e70b4c |
@ -11,7 +11,7 @@ We recommend the use of TypeScript for best in class intellisense.
|
||||
import * as nodehash from "nodehash";
|
||||
|
||||
// from stream
|
||||
let readStream = fs.createReadStream("./somefile.txt");
|
||||
let readStream = fs.createReadStream("./somefile.txt")
|
||||
nodehash.sha256FromStream(readStream)
|
||||
.then((resultString){
|
||||
console.log(resultString); // prints hash of the file
|
||||
@ -24,10 +24,10 @@ nodehash.sha256FromFile("./somefile.txt")
|
||||
});
|
||||
|
||||
// from string
|
||||
nodehash.sha256FromString("some weird random string");
|
||||
nodehash.sha256FromString("some weird random string")
|
||||
.then((resultString){
|
||||
console.log(resultString); // prints hash of the file
|
||||
});
|
||||
|
||||
let hashString = nodehash.sha256FromStringSync("some weird random string")
|
||||
let hashString = nodehash.sha256FromStringSync("some weird random string");
|
||||
```
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "nodehash",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.4",
|
||||
"description": "simplifies access to node hash functions",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
@ -14,7 +14,9 @@
|
||||
"keywords": [
|
||||
"hash",
|
||||
"node",
|
||||
"sha265"
|
||||
"sha256",
|
||||
"stream",
|
||||
"filehash"
|
||||
],
|
||||
"author": "Lossless GmbH",
|
||||
"license": "MIT",
|
||||
|
Reference in New Issue
Block a user