From 3439258818c7e84e6e8a4956ef7eba953fbd621c Mon Sep 17 00:00:00 2001 From: Anthony Kinsey Date: Wed, 7 May 2014 16:15:55 -1000 Subject: [PATCH] Changing sha to 256 --- invoicewebhooks.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/invoicewebhooks.js b/invoicewebhooks.js index 90e3669..bb28b8d 100644 --- a/invoicewebhooks.js +++ b/invoicewebhooks.js @@ -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) {