Example #1
0
        public void MakeTest()
        {
            EHash h = new EHash();

            List <ulong> hashs = new List <ulong>();

            byte[] buff = new byte[1024];

            int counter = 0;

            for (;;)
            {
                Console.WriteLine("Test : " + counter);
                new RNGCryptoServiceProvider(counter.ToString()).GetBytes(buff);
                ulong a = h.Compute(buff);
                if (!hashs.Contains(a))
                {
                    hashs.Add(a);
                    Console.Write(" = Unique hash ;)\n");
                }
                else
                {
                    Console.Write("= Error hash same! ;)\n");
                    Console.ReadKey();
                }
                counter++;
            }
        }
Example #2
0
        static void Main(string[] args)
        {
            Console.ForegroundColor = ConsoleColor.Green;

            new EHashStress().MakeTest();

            EHash h = new EHash();
            ulong s = h.Compute(Encoding.ASCII.GetBytes("Eddy^CZ"));

            if (s == 18120688786459961260)
            {
                Console.WriteLine("OK");
            }

            while (true)
            {
                Console.WriteLine("Type what you wanna hash:\n");
                Console.WriteLine(String.Format("\nResult: {0}", h.Compute(Encoding.ASCII.GetBytes(Console.ReadLine()))));
                Console.ReadKey();
            }
        }