GetHashCode() 공개 메소드

public GetHashCode ( ) : int
리턴 int
        public override int GetHashCode()
        {
            int hash = 0;

            if (forward != null)
            {
                hash ^= forward.GetHashCode();
            }
            if (reverse != null)
            {
                hash ^= reverse.GetHashCode();
            }
            return(hash);
        }
예제 #2
0
        public override int GetHashCode()
        {
            int num = -1;

            if (forward != null)
            {
                num ^= forward.GetHashCode();
            }
            if (reverse != null)
            {
                num *= 17;
                num ^= reverse.GetHashCode();
            }
            return(num);
        }
예제 #3
0
 /// <summary>
 /// Checks the certificate is already in cache. Cache is valid for 10 minutes after first certificate successful verification.
 /// </summary>
 /// <returns>
 /// <c>true</c>, if is the certificate is in memory, <c>false</c> otherwise.
 /// </returns>
 /// <param name='BCCert'>
 /// BouncyCastle cert to check.
 /// </param>
 private static bool CertificateIsTheSame(X509Certificate BCCert)
 {
     RemoveTimedOutCertificates();
     if (myCertificateList.Count>0 &&
         myCertificateList.ContainsKey(BCCert.GetHashCode()) &&
         CertIsValidNow(BCCert)){
             //trusted certificate
             return true;
     }
     else return false;
 }