1.0.0 • Published 8 years ago

@f/sha256 v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 years ago

sha256

Build status Git tag NPM version Code style

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 hash
  • encoding - Optional, defaults to 'base64'. Specifies the output format (hex/binary/base64).

Returns: Returns a string representation of the sha256 hash of str.

License

MIT