예제 #1
0
 public void ChangeRemoteDeskPassword()
 {
     lock (_rootAsync)
     {
         RemoteDeskPassword = MD5Encrypt.GetSeed(8);
     }
 }
예제 #2
0
        /// <summary>
        /// 获取最终加密后的密码密文。
        /// </summary>
        /// <param name="passwordMd5">明文密码MD5后的密文密码。</param>
        /// <param name="seed"></param>
        /// <returns></returns>
        public static string EncryptPassword(string passwordMd5, out string seed)
        {
            seed = MD5Encrypt.GetSeed(8);
            string str = string.Format("{0}{1}{2}{3}",
                                       Key1, passwordMd5.Substring(0, 22), Key2, passwordMd5.Substring(22, 10));

            return(MD5Encrypt.GetMD5(MD5Encrypt.GetMD5(str) + seed));
        }
예제 #3
0
        public void SeedTest()
        {
            HashSet <string> set = new HashSet <string>();
            int i = 0;

            while (i < 100)
            {
                set.Add(MD5Encrypt.GetSeed(8));
                Thread.Sleep(1);
                i++;
            }
        }