UNPKG

dbgate-api

Version:

Allows run DbGate data-manipulation scripts.

10 lines (7 loc) 252 B
const crypto = require('crypto'); function timingSafeCheckToken(a, b) { if (!a || !b) return false; if (a.length != b.length) return false; return crypto.timingSafeEqual(Buffer.from(a), Buffer.from(b)); } module.exports = timingSafeCheckToken;