// Constant-time string compare for auth-token comparison.
// Returns false when lengths differ, otherwise defers to crypto.timingSafeEqual.
import { timingSafeEqual } from 'node:crypto';
export function safeEqual(a, b) {
    const bufA = Buffer.from(a);
    const bufB = Buffer.from(b);
    if (bufA.length !== bufB.length)
        return false;
    return timingSafeEqual(bufA, bufB);
}
//# sourceMappingURL=safe-equal.js.map