コード例 #1
0
ファイル: HashTest.cs プロジェクト: 2014AmethystCat/wojilu
        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 ) );
            }
        }
コード例 #2
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));
            }
        }