Exemple #1
0
        public void Hint(string line)
        {
            ulong hash = Hash64.HashString(line);

            CheckCollision(hashes, hash, line);
            hashes[hash] = line;
        }
 public bool Load()
 {
     try
     {
         using (StreamReader streamReader = new StreamReader((Stream) new FileStream("hashes.txt", FileMode.Open)))
         {
             for (string input = streamReader.ReadLine(); input != null; input = streamReader.ReadLine())
             {
                 ulong hash = Hash64.HashString(input, 0UL);
                 this.CheckCollision(this.hashes, hash, input);
                 this.hashes[hash] = input;
             }
             streamReader.Close();
         }
     }
     catch (Exception ex)
     {
         return(false);
     }
     return(true);
 }