Example #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = 17;
         hash = (hash * 486187739) + PushId;
         hash = (hash * 486187739) + TableHash.GetHashCode();
         hash = (hash * 486187739) + RecordId;
         hash = (hash * 486187739) + (IsValid ? 1 : 0);
         hash = (hash * 486187739) + DataSize;
         hash = (hash * 486187739) + Data.GetHashCode();
         return(hash);
     }
 }
Example #2
0
        private void Validate(string mask, byte[] maskoffsets)
        {
            char[] maskdata = mask.ToCharArray();

            // sanity check the results
            var j = new TableHash();

            while (ResultQueue.Count > 0)
            {
                string s = StringGenerator.Generate(maskdata, ResultQueue.Dequeue(), maskoffsets, 26);
                uint   h = j.ComputeHash(s);
                if (TargetHashes.Contains(h))
                {
                    ResultStrings.Add(s);
                }
            }
        }