System.Security.Cryptography.X509Certificates.X509Certificate.X509Certificate.X509Certificate.GetHashCode C# (CSharp) Method

GetHashCode() public method

public GetHashCode ( ) : int
return int
		public override int GetHashCode ()
		{
#if NET_2_0
			if (x509 == null)
				return 0;
#endif
			// the cert hash may not be (yet) calculated
			if (cachedCertificateHash == null)
				GetCertHash();
		
			// return the integer of the first 4 bytes of the cert hash
			if ((cachedCertificateHash != null) && (cachedCertificateHash.Length >= 4))
				return ((cachedCertificateHash[0] << 24) |(cachedCertificateHash[1] << 16) |
					(cachedCertificateHash[2] << 8) | cachedCertificateHash[3]);
			else
				return 0;
		}