Skip to content

Commit

Permalink
Changing sha to 256
Browse files Browse the repository at this point in the history
  • Loading branch information
akinsey committed May 8, 2014
1 parent 3fb8b13 commit 3439258
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions invoicewebhooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ var crypto = require('crypto');
var db = require(__dirname + '/db');

function generatePostToken(token) {
return crypto.createHash('sha1').update(token).digest('hex');
return crypto.createHash('sha256').update(token).digest('hex');
}

function generateHandshakeToken(postToken, token) {
var toHash = postToken + token;
return crypto.createHash('sha1').update(toHash).digest('hex');
return crypto.createHash('sha256').update(toHash).digest('hex');
}

function postToWebhook(webhookObj, cb) {
Expand Down

0 comments on commit 3439258

Please sign in to comment.