PHP头条
热点:

php-求助各位大神,一小段C#转PHP


php

因工作需要,将下面这段C#用PHP实现,请教各位大神能帮忙写一下,我弄了两天了都没成功,书到用时方恨少。

public static string encryptData( string clientid, string CLIENTFLAG, string CLIENTKEY, string CLIENTCONST)

{
Random rd = new Random();
int N1 = rd.Next(1000, 10000);
int N2 = rd.Next(1000, 10000);
}
string str = N2 +CLIENTFLAG +CLIENTKEY +CLIENTCONST + N1;
byte[] byteStr = System.Text.Encoding.UTF8.GetBytes(str);
string strMd5 = BitConverter.ToString(md5.ComputeHash(byteStr)).Replace("-", string.Empty).ToLower();
return N1 + strMd5.Substring(7, 21) + N2;
}

www.phpzy.comtrue/phpyy/1496.htmlTechArticlephp-求助各位大神,一小段C#转PHP php 因工作需要,将下面这段C#用PHP实现,请教各位大神能帮忙写一下,我弄了两天了都没成功,书到用时方恨少。 public static string encryptData( string clien...

相关文章

相关频道:

PHP之友评论

今天推荐