導航:首頁 > 文檔加密 > qq一般是什麼加密

qq一般是什麼加密

發布時間:2025-08-18 08:41:33

❶ QQ空間登陸加密密碼演算法是什麼

QQ空間現在採用的是動態加密,加密結果和驗證碼有密切關系,
也就是說是:密碼+演算法+驗證碼在一起,加密演算法如下:
public static string smethod_0(string s)
{
MD5 mD = MD5.Create();
byte[] bytes = Encoding.ASCII.GetBytes(s);
byte[] array = mD.ComputeHash(bytes);
StringBuilder stringBuilder = new StringBuilder();
byte[] array2 = array;
for (int i = 0; i < array2.Length; i++)
{
byte b = array2[i];
stringBuilder.Append(b.ToString("x").PadLeft(2, '0'));
}
return stringBuilder.ToString().ToUpper();
}
public static byte[] EncyptMD5Bytes(string s)
{
MD5 mD = MD5.Create();
byte[] bytes = Encoding.ASCII.GetBytes(s);
return mD.ComputeHash(bytes);
}
public static string smethod_1(byte[] s)
{
MD5 mD = MD5.Create();
byte[] array = mD.ComputeHash(s);
StringBuilder stringBuilder = new StringBuilder();
byte[] array2 = array;
for (int i = 0; i < array2.Length; i++)
{
byte b = array2[i];
stringBuilder.Append(b.ToString("x").PadLeft(2, '0'));
}
return stringBuilder.ToString().ToUpper();
}
public static string EncryptQQWebMd5(string s)
{
MD5 mD = MD5.Create();
byte[] bytes = Encoding.ASCII.GetBytes(s);
byte[] array = mD.ComputeHash(bytes);
StringBuilder stringBuilder = new StringBuilder();
byte[] array2 = array;
for (int i = 0; i < array2.Length; i++)
{
byte b = array2[i];
stringBuilder.Append("\\x");
stringBuilder.Append(b.ToString("x2"));
}
return stringBuilder.ToString();
}
public static string EncryptOld(string password, string verifyCode)
{
return smethod_0(EncyptMD5_3_16(password) + verifyCode.ToUpper());
}
public static string Encrypt(string qq, string password, string verifyCode)
{
return Encrypt((long)Convert.ToDouble(qq), password, verifyCode);
}
public class ByteBuffer
{
private byte[] byte_0;
public Stream BaseStream;
public ByteBuffer()
{
this.BaseStream = new MemoryStream();
this.byte_0 = new byte[16];
}
public virtual long Seek(int offset, SeekOrigin origin)
{
return this.BaseStream.Seek((long)offset, origin);
}
public bool Peek()
{
return this.BaseStream.Position < this.BaseStream.Length;
}
public byte[] ToByteArray()
{
//long position = this.BaseStream.Position;
//this.BaseStream.Position = 0L;
//byte[] array = new byte[(int)((object)((IntPtr)this.BaseStream.Length))];
//this.BaseStream.Read(array, 0, array.Length);
//this.BaseStream.Position = position;
//return array;
long position = this.BaseStream.Position;
this.BaseStream.Position = 0L;
byte[] buffer = new byte[this.BaseStream.Length];
this.BaseStream.Read(buffer, 0, buffer.Length);
this.BaseStream.Position = position;
return buffer;
}
public void Put(bool value)
{
this.byte_0[0] = value ? ((byte)1) : ((byte)0);
this.BaseStream.Write(this.byte_0, 0, 1);
}
public void Put(byte value)
{
this.BaseStream.WriteByte(value);
}
public void Put(byte[] value)
{
if (value == null)
{
throw new ArgumentNullException("value");
}
this.BaseStream.Write(value, 0, value.Length);
}
public void PutInt(int value)
{
this.PutInt((uint)value);
}
public void PutInt(uint value)
{
this.byte_0[0] = (byte)(value >> 24);
this.byte_0[1] = (byte)(value >> 16);
this.byte_0[2] = (byte)(value >> 8);
this.byte_0[3] = (byte)value;
this.BaseStream.Write(this.byte_0, 0, 4);
}
public void PutInt(int index, uint value)
{
int offset = (int)this.BaseStream.Position;
this.Seek(index, SeekOrigin.Begin);
this.PutInt(value);
this.Seek(offset, SeekOrigin.Begin);
}
public byte Get()
{
return (byte)this.BaseStream.ReadByte();
}
}
public static string Encrypt(long qq, string password, string verifyCode)
{
ByteBuffer byteBuffer = new ByteBuffer();
byteBuffer.Put(EncyptMD5Bytes(password));
byteBuffer.PutInt(0);
byteBuffer.PutInt((uint)qq);
EncryptQQWebMd5(password);
byte[] s = byteBuffer.ToByteArray();
string str = smethod_1(s);
return smethod_0(str + verifyCode.ToUpper());
}

上面的加密演算法,調用方法是:string str = Encrypt(QQ號, QQ密碼, 驗證碼);
加密後的密碼會返回到str中,然後使用返回的密碼進行登錄。
註:QQ空間登錄是採用的GET而不是POST。

❷ QQ密碼是採用什麼加密演算法

由於QQ的密碼是經過128位加密處理的,且不可逆計算。只能由QQ自己的賬號登錄後才可以識別和打開的。

QQ客戶端向伺服器發送一個請求登錄的數據包。伺服器返回登錄令牌。這個令牌是在伺服器端生成的。和客戶端的IP地址,版本信息等數據相關。以後會用到這個令牌去進行其他操作。

QQ客戶端得到登錄令牌之後,就會向伺服器發送一個包含登錄信息的登錄請求,要求登錄。服務順會首先看看客戶端的號碼,守址和版本是否可以在本伺服器上進行登錄。

(2)qq一般是什麼加密擴展閱讀:

修改QQ密碼步驟:

1、首先在手機上面登錄到QQ帳號,然後點擊屏幕左上角的頭像。點擊左上角的頭像以後出現側拉菜單,再菜單上面點擊設置。

閱讀全文

與qq一般是什麼加密相關的資料

熱點內容
zookeeper源碼設計 瀏覽:275
安卓如何轉外網 瀏覽:210
圖像分割演算法的研究與實現 瀏覽:395
打開不完整壓縮文件夾 瀏覽:249
安裝完伺服器怎麼配置 瀏覽:787
vr32命令什麼意思 瀏覽:86
java內存不足 瀏覽:119
北京伺服器配件市場雲主機伺服器 瀏覽:326
什麼是投影機安卓棒 瀏覽:437
如何在阿里雲伺服器寫程序 瀏覽:604
maincpp怎麼轉換成命令編譯 瀏覽:315
三星怎麼裝央視app 瀏覽:728
ug編程r值 瀏覽:108
方舟生存進化如何登錄官方伺服器 瀏覽:591
平安雲伺服器哪個好 瀏覽:92
程序員老爸帶孩子 瀏覽:949
aspnet還是php 瀏覽:233
還是文件夾夾娃娃機 瀏覽:844
加密磁碟後系統重裝不了 瀏覽:874
管家婆的伺服器怎麼改 瀏覽:842