Constant-time comparison algorithm to prevent timing attacks for Node.js