notp
notp copied to clipboard
Blind code comparison to timing attacks
https://codahale.com/a-lesson-in-timing-attacks/
Build failure is unrelated to code
Why not
if (crypto.timingSafeEqual(Buffer.from(this.generate(key, opt)), Buffer.from(token))) {