Exemplo n.º 1
0
        public string BHasherMdjb2Test(string toHash)
        {
            BHasher hasher = new BHasherMdjb2();

            byte[] byt = Encoding.ASCII.GetBytes(toHash);
            hasher.Add(byt, 0, byt.Length);
            BHash hash = hasher.Finish();

            // System.Console.WriteLine("BHasherMdjb2 hash output = " + hash.ToString());
            return(hash.ToString());
        }
Exemplo n.º 2
0
        public ulong BHasherMdjb2TestParams()
        {
            BHasher hasher = new BHasherMdjb2();

            hasher.Add('c');
            hasher.Add((ushort)6);
            hasher.Add((int)12345);
            hasher.Add(-2345L);
            byte[] byt = Encoding.ASCII.GetBytes("This is a string");
            hasher.Add(byt, 0, byt.Length);
            BHash hash = hasher.Finish();

            // System.Console.WriteLine("BHasher hash output = " + hash.ToString());
            return(hash.ToULong());
        }