有懂C#的朋友吗?帮忙翻译成易语言代码如何?
protected string Sig(Dictionary<string, string> args){
Dictionary<string, string> codes = new Dictionary<string, string>()
{
{"a","3"},
{"b","4"},
{"c","5"},
{"d","9"},
{"e","8"},
{"f","7"},
{"g","1"},
{"h","2"},
{"i","6"},
{"j","0"},
{"k","a"},
{"l","b"},
{"m","c"},
{"n","d"},
{"o","e"},
{"p","f"},
{"q","g"},
{"r","z"},
{"s","y"},
{"t","x"},
{"u","w"},
{"v","v"},
{"w","u"},
{"x","o"},
{"y","p"},
{"z","q"},
{"0","s"},
{"1","t"},
{"2","r"},
{"3","h"},
{"4","i"},
{"5","j"},
{"6","k"},
{"7","l"},
{"8","m"},
{"9","n"}
};
var list = new List<string>();
foreach (var arg in args.Keys)
{
list.Add(arg);
}
list.Sort();
var temp = new List<string>();
for (var i = 0; i < list.Count; i++)
{
temp.Add(list + "=" + args]);
}
var md5Str = temp.Join("&").MD5();
var screen = "19201080";
var str = "";
for (var i = 0; i < screen.Length; i++)
{
str += codes.ToString()];
}
var result = "";
var index = 0;
if (md5Str.Length >= str.Length)
{
for (index = 0; index < str.Length; index++)
{
result += md5Str.ToString() + str.ToString();
}
result += md5Str.Substring(index);
}
else
{
for (index = 0; index < md5Str.Length; index++)
{
result += md5Str.ToString() + str.ToString();
}
result += md5Str.Substring(index);
}
var aes = new Xhelper.Crypto.AES("moonshadmoonshad");
var text = aes.Encrypt(result);
text = Convert.ToBase64String(Encoding.UTF8.GetBytes(text));
return text;
}
懂C#的帮忙翻译成易语言一下哦,谢谢大家了! 楼主发贴辛苦了,谢谢楼主分享!我觉得易语言吧是注册对了!
页:
[1]