hash-file-cli

1.0.0 • Public • Published

hash-file-cli npmjs.com The MIT License

Create hash from file. CLI for hash-file

code climate standard code style travis build status cov status dependency status

Install

npm i hash-file --save
npm test

API

For more use-cases see the tests. You also can use it as hash-file.

var hashFile = require('hash-file-cli')
 
hashFile('./package.json', function (err, hash) {
    console.log(hash)
    //=> 'c32f3a677ba94c51e2a0123e3f18caccb7d5fb6ce5ea6d61b2ff816200004426a5dbb73bb7ab2f607ed18f3e63476c785c48341e8645193cd1f7b842ed1adaee'
})
 
hashFile('./package.json', {algorithm: 'sha1'} function (err, hash) {
    console.log(hash)
    //=> '5baa798212ebfa71da5b0e0b8287220ed54e56b2'
})

CLI

Just run npm i -g hash-file to install it globally.

$ hash-file --help

  Usage
    $ hash-file <file>
    $ cat <file> | hash-file

  Example
    $ hash-file unicorn.jpg --algorithm=md5
    1abcb33beeb811dca15f0ac3e47b88d9

  Options
    --algorithm  Cipher algorithm: md5,sha1,sha256,sha512   Default: sha512s
    --encoding   Output encoding: hex,base64,buffer,binary  Default: hex

Related

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
But before doing anything, please read the CONTRIBUTING.md guidelines.

Charlike Make Reagent new message to charlike freenode #charlike

tunnckocore.tk keybase tunnckocore tunnckoCore npm tunnckoCore twitter tunnckoCore github

Package Sidebar

Install

npm i hash-file-cli

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • vanchoy
  • tunnckocore