Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies. Update buffer usage. #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update dependencies. Update buffer usage.
  • Loading branch information
Hexagon committed Dec 18, 2021
commit f426507011d69daf7df1e87e2c050e6cb6eeb98f
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ hotp.gen = function(key, opt) {
var p = 6;

// Create the byte array
var b = new Buffer(intToBytes(counter));
var b = Buffer.from(intToBytes(counter));

var hmac = crypto.createHmac('sha1', new Buffer(key));
var hmac = crypto.createHmac('sha1', Buffer.from(key));

// Update the HMAC with the byte array
var digest = hmac.update(b).digest('hex');
Expand Down
Loading