Sha256: 2003c55055b821d3f7f03957289e0bc007d09cfe5913ba42504b73b24513ae15
Contents?: true
Size: 346 Bytes
Versions: 15
Compression:
Stored size: 346 Bytes
Contents
# frozen_string_literal: true module OpenSSL class HMAC # Securely compare with another HMAC instance in constant time. def ==(other) return false unless HMAC === other return false unless self.digest.bytesize == other.digest.bytesize OpenSSL.fixed_length_secure_compare(self.digest, other.digest) end end end
Version data entries
15 entries across 15 versions & 3 rubygems