コード例 #1
0
ファイル: DigestResult.cs プロジェクト: lanicon/TomP2P.NET
        public override int GetHashCode()
        {
            int hashCode = 0;

            if (KeyDigest != null)
            {
                hashCode ^= KeyDigest.GetHashCode(); // TODO has different hash as in Java!
            }
            if (ContentBloomFilter != null)
            {
                hashCode ^= ContentBloomFilter.GetHashCode();
            }
            if (VersionBloomFilter != null)
            {
                hashCode ^= VersionBloomFilter.GetHashCode();
            }
            if (DataMap != null)
            {
                hashCode ^= DataMap.GetHashCode();
            }
            return(hashCode);
        }
コード例 #2
0
 public override int GetHashCode()
 {
     return(KeyDigest.GetHashCode() ^ Size ^ ContentDigest.GetHashCode());
 }