Merge pull request #15 from martinvl/master

Fixed issue with hash algorithm using Browserify
This commit is contained in:
Guy Halford-Thompson 2014-09-03 10:06:36 -07:00
commit 66f1f0fe3f

View File

@ -27,7 +27,7 @@ hotp.gen = function(key, opt) {
// Create the byte array
var b = new Buffer(intToBytes(counter));
var hmac = crypto.createHmac('SHA1', new Buffer(key));
var hmac = crypto.createHmac('sha1', new Buffer(key));
// Update the HMAC with the byte array
var digest = hmac.update(b).digest('hex');
@ -215,4 +215,3 @@ var hexToBytes = function(hex) {
}
return bytes;
};