1.0.0 • Published 8 years ago
@f/sha256 v1.0.0
sha256
Compute the SHA256 hash of something
Installation
$ npm install @f/sha256
Usage
var sha256 = require('@f/sha256')
function hashFile (path) {
return sha256(fs.readFileSync(path))
}
API
sha256(str, encoding)
str
- The string you want to hashencoding
- Optional, defaults to 'base64'. Specifies the output format (hex/binary/base64
).
Returns: Returns a string representation of the sha256 hash of str
.
License
MIT
1.0.0
8 years ago