public static string getRNum(string str) { MachineCode.setIntCode(); string str1 = str + MachineCode.EncryptDES("mobstermobstermobstermobstermobstermobstermobstermobster", "shuangseq"); for (int index = 1; index < MachineCode.Charcode.Length; ++index) { MachineCode.Charcode[index] = Convert.ToChar(str1.Substring(index - 1, 1)); } for (int index = 1; index < MachineCode.intNumber.Length; ++index) { MachineCode.intNumber[index] = MachineCode.intCode[Convert.ToInt32(MachineCode.Charcode[index])] + Convert.ToInt32(MachineCode.Charcode[index]); } string str2 = ""; for (int index = 1; index < MachineCode.intNumber.Length; ++index) { str2 = MachineCode.intNumber[index] < 48 || MachineCode.intNumber[index] > 57 ? (MachineCode.intNumber[index] < 65 || MachineCode.intNumber[index] > 90 ? (MachineCode.intNumber[index] < 97 || MachineCode.intNumber[index] > 122 ? (MachineCode.intNumber[index] <= 122 ? str2 + Convert.ToChar(MachineCode.intNumber[index] - 9).ToString() : str2 + Convert.ToChar(MachineCode.intNumber[index] - 10).ToString()) : str2 + Convert.ToChar(MachineCode.intNumber[index]).ToString()) : str2 + Convert.ToChar(MachineCode.intNumber[index]).ToString()) : str2 + Convert.ToChar(MachineCode.intNumber[index]).ToString(); } return(str2.ToUpper()); }
public static string getRNum(string str) { MachineCode.setIntCode(); string text = str + MachineCode.EncryptDES("mobstermobstermobstermobstermobstermobstermobstermobster", "shuangseq"); for (int i = 1; i < MachineCode.Charcode.Length; i++) { MachineCode.Charcode[i] = Convert.ToChar(text.Substring(i - 1, 1)); } for (int j = 1; j < MachineCode.intNumber.Length; j++) { MachineCode.intNumber[j] = MachineCode.intCode[Convert.ToInt32(MachineCode.Charcode[j])] + Convert.ToInt32(MachineCode.Charcode[j]); } string text2 = ""; for (int k = 1; k < MachineCode.intNumber.Length; k++) { if (MachineCode.intNumber[k] >= 48 && MachineCode.intNumber[k] <= 57) { text2 += Convert.ToChar(MachineCode.intNumber[k]).ToString(); } else if (MachineCode.intNumber[k] >= 65 && MachineCode.intNumber[k] <= 90) { text2 += Convert.ToChar(MachineCode.intNumber[k]).ToString(); } else if (MachineCode.intNumber[k] >= 97 && MachineCode.intNumber[k] <= 122) { text2 += Convert.ToChar(MachineCode.intNumber[k]).ToString(); } else if (MachineCode.intNumber[k] > 122) { text2 += Convert.ToChar(MachineCode.intNumber[k] - 10).ToString(); } else { text2 += Convert.ToChar(MachineCode.intNumber[k] - 9).ToString(); } } return(text2.ToUpper()); }