Skip to content

Instantly share code, notes, and snippets.

@hamishcampbell
Forked from wombleton/sha.js
Last active December 18, 2015 13:59
Show Gist options
  • Save hamishcampbell/5793542 to your computer and use it in GitHub Desktop.
Save hamishcampbell/5793542 to your computer and use it in GitHub Desktop.
console.log(require('crypto').createHash('sha1').update('blob 14\0Hello, World!').digest('hex'));
$> d4fcfe4d339d4e59d168fdf3c0ad445fa980a7d6
>>> from hashlib import sha1
>>> sha1('blob 14\0Hello, World!').hexdigest()
'd4fcfe4d339d4e59d168fdf3c0ad445fa980a7d6'
echo -e 'blob 14\0Hello, World!' | shasum -a 1
$> 8ab686eafeb1f44702738c8b0f24f2567c36da6d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment