1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-17 07:36:32 +09:00

Encryption fixed

This commit is contained in:
lidgren
2014-10-10 07:35:17 +00:00
parent e206ba210e
commit d38143cca7
14 changed files with 167 additions and 96 deletions

View File

@@ -185,7 +185,7 @@ namespace Lidgren.Network
/// <summary>
/// Create XTEA symmetrical encryption object from sessionValue
/// </summary>
public static NetXtea CreateEncryption(byte[] sessionValue)
public static NetXtea CreateEncryption(NetPeer peer, byte[] sessionValue)
{
var sha = GetHashAlgorithm();
var hash = sha.ComputeHash(sessionValue);
@@ -198,7 +198,7 @@ namespace Lidgren.Network
key[i] ^= hash[i + (j * 16)];
}
return new NetXtea(key);
return new NetXtea(peer, key);
}
}
}