public override int GetHashCode()
        {
            int hash = PublicKey.Sum(b => b + 31);

            hash += AttestationCert.Sum(b => b + 31);
            hash += KeyHandle.Sum(b => b + 31);
            return(hash);
        }
        public override bool Equals(object obj)
        {
            if (!(obj is DeviceRegistration))
            {
                return(false);
            }

            DeviceRegistration other = (DeviceRegistration)obj;

            return(KeyHandle.SequenceEqual(other.KeyHandle) &&
                   PublicKey.SequenceEqual(other.PublicKey) &&
                   AttestationCert.SequenceEqual(other.AttestationCert) &&
                   (IsCompromised == other.IsCompromised));
        }