Exemplo n.º 1
0
        public override int GetHashCode()
        {
            var hashCode = 48313; // setting it to a random prime number

            if (Kid != null)
            {
                hashCode += Kid.GetHashCode();
            }

            switch (Kty)
            {
            case JsonWebKeyType.Octet:
                return(hashCode + GetHashCode(K));

            case JsonWebKeyType.EllipticCurve:
                return(hashCode + GetHashCode(X));

            case JsonWebKeyType.Rsa:
                return(hashCode + GetHashCode(N));

            case JsonWebKeyType.EllipticCurveHsm:
            case JsonWebKeyType.RsaHsm:
                return(hashCode + GetHashCode(T));

            default:
                return(hashCode);
            }
        }
Exemplo n.º 2
0
 public override int GetHashCode()
 {
     return(Kid.GetHashCode());
 }