notp icon indicating copy to clipboard operation
notp copied to clipboard

HOTP counter not working as expected

Open TABmk opened this issue 4 years ago • 1 comments

https://github.com/guyht/notp/blob/bbdf82a34e5cb1534c411aaa63185bfab29feba0/index.js#L10-L19

intToBytes(9999999999999) will give [0, 0, 0, 0, 78, 114, 159, 255] which is <Buffer 00 00 00 00 4e 72 9f ff>

But 9999999999999 decimal to hexadecimal must return 00 00 09 18 4E 72 9F FF

TABmk avatar Feb 05 '21 10:02 TABmk

Well... [...Buffer.from("0" + BigInt(9999999999999).toString(16), "hex")]

ugly hack, bug whatever...

Uzlopak avatar Nov 22 '21 17:11 Uzlopak