/// <summary> /// Initializes new <see cref="UserSession"/> object. /// </summary> /// <returns>New <see cref="UserSession"/> object.</returns> private static UserSession InitializeSession(string ipAddress) { return(new UserSession() { ID = L2Random.Next(), IPAddress = ipAddress, Login1 = L2Random.Next(), Login2 = L2Random.Next(), Play1 = L2Random.Next(), Play2 = L2Random.Next(), BlowfishKey = L2Random.NextBytes(16), StartTime = DateTime.Now, LastWorld = 1 }); }
/// <summary> /// Generates next random blowfish key. /// </summary> /// <returns>Next random blowfish key.</returns> internal static byte[] GetNext() { return(L2Buffer.Replace(sk, 0, L2Random.NextBytes(8), 8)); }