Skip to content

Instantly share code, notes, and snippets.

@rmtsrc
Last active September 27, 2015 10:32
Show Gist options
  • Save rmtsrc/ca9d88e2844be8a65021 to your computer and use it in GitHub Desktop.
Save rmtsrc/ca9d88e2844be8a65021 to your computer and use it in GitHub Desktop.
Node validate GitHub webhook SHA1 HMAC
var crypto = require('crypto'),
hmac = crypto.createHmac('sha1', 'GitHub Secret');
hmac.update(GitHub_POST_data);
console.log('sha1=' + hmac.digest('hex'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment