parent
1aed728dd4
commit
22e48620d1
3
index.js
3
index.js
@ -27,7 +27,7 @@ hotp.gen = function(key, opt) {
|
|||||||
// Create the byte array
|
// Create the byte array
|
||||||
var b = new Buffer(intToBytes(counter));
|
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
|
// Update the HMAC with the byte array
|
||||||
var digest = hmac.update(b).digest('hex');
|
var digest = hmac.update(b).digest('hex');
|
||||||
@ -215,4 +215,3 @@ var hexToBytes = function(hex) {
|
|||||||
}
|
}
|
||||||
return bytes;
|
return bytes;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user