Ejemplo n.º 1
0
        public void md5()
        {
            string pwd = "1234";

            HashTool hashTool = new HashTool();

            Console.WriteLine(hashTool.Get(pwd, HashType.MD5_16));
            Console.WriteLine(hashTool.Get(pwd, HashType.MD5));
        }
Ejemplo n.º 2
0
        public void md5()
        {
            string pwd = "1234";

            HashTool hashTool = new HashTool();

            Console.WriteLine( hashTool.Get( pwd, HashType.MD5_16 ) );
            Console.WriteLine( hashTool.Get( pwd, HashType.MD5 ) );
        }
Ejemplo n.º 3
0
        public void sha2()
        {
            string pwd = "1234";

            HashTool hashTool = new HashTool();

            Console.WriteLine( hashTool.Get( pwd, HashType.SHA384 ) );
            // 9198EAB4
            Console.WriteLine( hashTool.Get( pwd + "9198EAB4", HashType.SHA384 ) );
            //Console.WriteLine( HashTool.GetSalt( 4 ) );

            Console.WriteLine(  );

            Console.WriteLine( hashTool.GetBySalt( pwd, "9198EAB4", HashType.SHA384 ) );
        }
Ejemplo n.º 4
0
        public void sha2()
        {
            string pwd = "1234";

            HashTool hashTool = new HashTool();

            Console.WriteLine(hashTool.Get(pwd, HashType.SHA384));
            // 9198EAB4
            Console.WriteLine(hashTool.Get(pwd + "9198EAB4", HashType.SHA384));
            //Console.WriteLine( HashTool.GetSalt( 4 ) );


            Console.WriteLine(  );

            Console.WriteLine(hashTool.GetBySalt(pwd, "9198EAB4", HashType.SHA384));
        }
Ejemplo n.º 5
0
        public void getSalt()
        {
            string pwd = "aaa";

            HashTool hashTool = new HashTool();

            Console.WriteLine( "myMd5=" + hashTool.Get( pwd, HashType.MD5_16 ) );
            Console.WriteLine( "myMd5=" + hashTool.Get( pwd, HashType.MD5 ) );
            Console.WriteLine( "mySHA1=" + hashTool.Get( pwd, HashType.SHA1 ) );
            Console.WriteLine( "mySHA2=" + hashTool.Get( pwd, HashType.SHA384 ) );
            Console.WriteLine( "mySHA5=" + hashTool.Get( pwd, HashType.SHA512 ) );

            Console.WriteLine( "GetRandomPassword="******"GetRandomPassword="******"GetSalt=" + hashTool.GetSalt( i ) );
            }
        }
Ejemplo n.º 6
0
        public void getSalt()
        {
            string pwd = "aaa";

            HashTool hashTool = new HashTool();

            Console.WriteLine("myMd5=" + hashTool.Get(pwd, HashType.MD5_16));
            Console.WriteLine("myMd5=" + hashTool.Get(pwd, HashType.MD5));
            Console.WriteLine("mySHA1=" + hashTool.Get(pwd, HashType.SHA1));
            Console.WriteLine("mySHA2=" + hashTool.Get(pwd, HashType.SHA384));
            Console.WriteLine("mySHA5=" + hashTool.Get(pwd, HashType.SHA512));

            Console.WriteLine("GetRandomPassword="******"GetRandomPassword="******"GetSalt=" + hashTool.GetSalt(i));
            }
        }