QQ使用的加密方式


//QQ的EncryptUtil
public class QQEncryptUtil
{
public static string EncodePasswordWithVerifyCode(string password, string verifyCode)
{
return MD5(MD5_3(password) + verifyCode.ToUpper());
}

static string MD5_3(string arg)
{
System.Security.Cryptography.MD5 md5 = System.Security.Cryptography.MD5.Create();

byte[] buffer = System.Text.Encoding.ASCII.GetBytes(arg);
buffer = md5.ComputeHash(buffer);
buffer = md5.ComputeHash(buffer);
buffer = md5.ComputeHash(buffer);

return BitConverter.ToString(buffer).Replace("-", "").ToUpper();
}
static string MD5(string arg)
{
System.Security.Cryptography.MD5 md5 = System.Security.Cryptography.MD5.Create();

byte[] buffer = System.Text.Encoding.ASCII.GetBytes(arg);
buffer = md5.ComputeHash(buffer);

return BitConverter.ToString(buffer).Replace("-", "").ToUpper();
}
}


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM