public void ChangeRemoteDeskPassword() { lock (_rootAsync) { RemoteDeskPassword = MD5Encrypt.GetSeed(8); } }
/// <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)); }
public void SeedTest() { HashSet <string> set = new HashSet <string>(); int i = 0; while (i < 100) { set.Add(MD5Encrypt.GetSeed(8)); Thread.Sleep(1); i++; } }