public SessionConnectionData() { IssacClient = new ISAAC(ISAAC.ClientSeed); IssacServer = new ISAAC(ISAAC.ServerSeed); PacketSequence = new UIntSequence(false); ServerTime = WorldManager.PortalYearTicks; }
public SessionConnectionData() { // since the network processor is single threaded this can instantiate the .NET Core System.Random class without locking Random rand = new Random(); // the client and server seeds determine where on the 32 bit wheel the stream cipher begins // by picking a random initialization vector it makes it more difficult for an adversary to forge packets ClientSeed = new byte[4]; ServerSeed = new byte[4]; rand.NextBytes(ClientSeed); rand.NextBytes(ServerSeed); CryptoClient = new CryptoSystem(ClientSeed); IssacServer = new ISAAC(ServerSeed); byte[] bytes = new byte[8]; rand.NextBytes(bytes); ConnectionCookie = BitConverter.ToUInt64(bytes, 0); PacketSequence = new UIntSequence(false); }
public SessionConnectionData() { IssacClient = new ISAAC(ISAAC.ClientSeed); IssacServer = new ISAAC(ISAAC.ServerSeed); PacketSequence = new UIntSequence(false); }