You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-15 22:56:30 +09:00
initializing network (including binding to socket) moved out from network thread, enabling catching of exceptions
ConnectionReset on reading handled properly (by disconnecting) when only one connection readonly added to various members
This commit is contained in:
@@ -216,14 +216,14 @@ namespace Lidgren.Network
|
||||
/// </summary>
|
||||
public static byte[] ComputeClientPublicKey(byte[] clientPrivateKey) // a
|
||||
{
|
||||
BigInteger salt = new BigInteger(clientPrivateKey);
|
||||
BigInteger a = new BigInteger(clientPrivateKey);
|
||||
|
||||
BigInteger retval = g.ModPow(salt, N);
|
||||
BigInteger retval = g.ModPow(a, N);
|
||||
|
||||
string gs = NetUtility.ToHexString(g.GetBytes());
|
||||
|
||||
|
||||
Console.WriteLine("SALT: " + NetUtility.ToHexString(salt.GetBytes()));
|
||||
Console.WriteLine("a: " + NetUtility.ToHexString(a.GetBytes()));
|
||||
Console.WriteLine("A: " + NetUtility.ToHexString(retval.GetBytes()));
|
||||
|
||||
return retval.GetBytes();
|
||||
|
||||
Reference in New Issue
Block a user