@ansugroup/timing-safe-equal
v0.1.3
Published
> Nodejs, Browser
Downloads
149
Maintainers
Readme
@ansugroup/timing-safe-equal
Nodejs, Browser
A copy package of safe-compare
rewritten with TypeScript for internal use in Ansugroup. crypto.timingSafeEqual
for browser.
Install
yarn add @ansugroup/timing-safe-equal
Usage
import timingSafeEqual from "@ansugroup/timing-safe-equal";
timingSafeEqual("hello world", "hello world"); // -> true
timingSafeEqual("hello", "not hello"); // -> false
timingSafeEqual("hello foo", "hello bar"); // -> false
License
MIT