public static string RealseLock(string lock_password, string ckey) { string password = string.Empty; string get_str = MyAlgorithm.Decrypt(lock_password, ckey);//得到解密后的字符串 int count = get_str.Length - 2; get_str = get_str.Substring(1, count); foreach (char str in get_str) { if (str.Equals('.')) { continue; } else { password = str + password; } } return(password); }
public static string RealseLock_S(string lock_password, string ckey) { string password = string.Empty; string get_str = MyAlgorithm.Decrypt(lock_password, ckey);//得到解密后的字符串 // int count = get_str.Length - 2; // get_str = get_str.Substring(1, count); int sum = 0; foreach (char str in get_str) { sum++; if (sum % 2 == 0) { continue; } else { password = str + password; } } return(password); }