scmp
Safe, constant-time comparison of Buffers.
Install
npm install scmp
Why?
To minimize vulnerability against timing attacks.
Example
const scmp = ;const Buffer = Buffer; const hash = Buffer;const givenHash = Buffer; if console; else console;