1.0.0 • Published 9 years ago

timing-safe-strcmp v1.0.0

Weekly downloads
5
License
Apache-2.0
Repository
github
Last release
9 years ago

timing-safe-strcmp

Compare any strings in timing-safe manner

(referenceString, actualString) ⇒ bool

Compares two strings/buffers for equality in timing-safe manner

Kind: Main export

ParamDescription
referenceString(string|Buffer)
actualString(string|Buffer)

.compareConstantLengthBuffers(buf1, buf2) => bool

Compare two buffers of equal length in timing-safe manner. Will use crypto.timingSafeEqual if possible, otherwise custom function.