sha1-file
Overview
Simply return an sha1
sum of a given file.
Installation
$ npm install sha1-file
API
Sync:
sha1File(path)
var sha1File = require('sha1-file');
sha1File('path/to/a_file');
Async:
sha1File(path, callback, [strict])
If strict is true
and there is an error it will throw
it, otherwise it will pass an error string through the callback.
sha1File.async('./README.md', function (data) {
console.log(data);
});
sha1File.async('./README.md', function (data) {
console.log(data);
}, true);
sha1File.async('./null', function (data) {
console.log(data);
});
sha1File.async('./null', function (data) {
console.log(data);
}, true);