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