Skip to content

Instantly share code, notes, and snippets.

@xissy
Forked from guybrush/gist:721762
Last active October 10, 2015 13:18
Show Gist options
  • Save xissy/3696218 to your computer and use it in GitHub Desktop.
Save xissy/3696218 to your computer and use it in GitHub Desktop.
Get a sha1 hash value from a file.
#!/usr/bin/env node
require('fs').readFile('image.png',function(err, data){
console.log(require('crypto').createHash('sha1').update(data).digest('hex'))
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment