public static string Decrypt(byte[] bytes)
{
BinaryReader reader = new BinaryReader(new MemoryStream(bytes, false));
uint[] passInts = new uint[4];
for (uint i = 0; i < 4; i++)
passInts[i] = Convert.ToUInt32(reader.ReadUInt32());
uint temp1, temp2;
for (int i = 1; i >= 0; i--)
{
temp1 = passInts[(i * 2) + 1];
temp2 = passInts[i * 2];
for (int j = 11; j >= 0; j--)
{
temp1 = RightRotate(temp1 - _key[j * 2 + 7], temp2) ^ temp2;
temp2 = RightRotate(temp2 - _key[j * 2 + 6], temp1) ^ temp1;
}
passInts[i * 2 + 1] = temp1 - _key[5];
passInts[i * 2] = temp2 - _key[4];
}
BinaryWriter writer = new BinaryWriter(new MemoryStream(bytes, true));
for (uint i = 0; i < 4; i++)
writer.Write((int)passInts[i]);
for (int i = 0; i < 16; i++)
if (bytes[i] == 0)
return Encoding.ASCII.GetString(bytes, 0, i);
return Encoding.ASCII.GetString(bytes);
}
Accoding to e*pvp you posted the second error within 2 hours of fixing the first one, you have NOT tryed very hard at ALL.
Try for a day or two and if you still have troubbles then make a thread but 2 hours is just stupid, I've spent 3 days on just one error before. It pays off.
N.B. Maybe you can check my public implementation.
Really? Didn't know that. I only saw the word "RC5" appearing in relation to the password decryption after the new password encryption came along so figured that the old one didn't use it.
Well I've already got a solution that Fang gave me, I'm gonna try that out if it doesn't work out I'll post again.
Atleast thanks for the support!
Btw wasn't RC5 a layer for old password encryptions because Fang told me that NetDragon's Pass Encryption is in version 5017 - 5165 and after that version it should be something else like RC5 maybe?
Really? Didn't know that. I only saw the word "RC5" appearing in relation to the password decryption after the new password encryption came along so figured that the old one didn't use it.
Because before that, the password encryption wasn't really known by the public. When TQ added a new layer over the RC5 and that the RC5 was seeded with a random seed, it became less important to keep the information private. Also, the only public implementation was really badly implemented.
Quote:
Originally Posted by JobvdH
[...]Btw wasn't RC5 a layer for old password encryptions because Fang told me that NetDragon's Pass Encryption is in version 5017 - 5165 and after that version it should be something else like RC5 maybe?
RC5 is used since the beta of Eudemon Online for the password. At patch 5180, TQ added a new layer over this crypto, plus they added a random seed.
Homepage mit Regi,Rangliste,Password ändern,Password vergessen 04/06/2010 - Metin2 Private Server - 2 Replies Hallo kann mir jemand diese Homepage http://www.elitepvpers.com/forum/metin2-pserver-gui des-strategies/451847-homepage-release-exklusiv-de sign-ranking-etc-etc.html ändern damit dort nurnoch Regiseite,Rangliste,Password ändern,Password vergesen machen kann wäre sehr nett
thx ist klar