Skip to content

Instantly share code, notes, and snippets.

@guybrush
Created November 30, 2010 14:38
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save guybrush/721762 to your computer and use it in GitHub Desktop.
Save guybrush/721762 to your computer and use it in GitHub Desktop.
nodejs file-sha1
#!/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