class Attio::WebhookUtils::SignatureVerifier

def secure_compare(a, b)

Secure string comparison to prevent timing attacks
def secure_compare(a, b)
  return false unless a.bytesize == b.bytesize
  l = a.unpack("C*")
  r = b.unpack("C*")
  result = 0
  l.zip(r) { |x, y| result |= x ^ y }
  result == 0
end