Skip to content

Commit

Permalink
fix: reverse TOTP code (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianBoehlke committed Sep 19, 2023
1 parent c13760f commit 4952a52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function generateHOTP(

let hotp = ''
for (let i = 0; i < digits; i++) {
hotp += charSet.charAt(hotpVal % charSet.length)
hotp = charSet.charAt(hotpVal % charSet.length) + hotp
hotpVal = Math.floor(hotpVal / charSet.length)
}

Expand Down

0 comments on commit 4952a52

Please sign in to comment.