BraintreeEncryption.Library.BouncyCastle.Asn1.Asn1TaggedObject.Asn1GetHashCode C# (CSharp) Method

Asn1GetHashCode() protected method

protected Asn1GetHashCode ( ) : int
return int
        protected override int Asn1GetHashCode()
        {
            int code = tagNo.GetHashCode();

            // TODO: actually this is wrong - the problem is that a re-encoded
            // object may end up with a different hashCode due to implicit
            // tagging. As implicit tagging is ambiguous if a sequence is involved
            // it seems the only correct method for both equals and hashCode is to
            // compare the encodings...
            //			code ^= explicitly.GetHashCode();

            if (obj != null)
            {
                code ^= obj.GetHashCode();
            }

            return code;
        }