timing-safe-strcmp
Compare any strings in timing-safe manner
bool
(referenceString, actualString) ⇒ Compares two strings/buffers for equality in timing-safe manner
Kind: Main export
Param | Description |
---|---|
referenceString | (string|Buffer) |
actualString | (string|Buffer) |
bool
.compareConstantLengthBuffers(buf1, buf2) => Compare two buffers of equal length in timing-safe manner. Will use crypto.timingSafeEqual
if possible, otherwise custom function.