PROTIP: System.Random isn't actually random. Use RNGCryptoServiceProvider in System.Security.Cryptography if your generating random numbers for security related purposes.
parent
d663dfa3bd
commit
13da0673b2
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using OpenSim.Framework.Inventory;
|
using OpenSim.Framework.Inventory;
|
||||||
|
using System.Security.Cryptography;
|
||||||
|
|
||||||
namespace OpenSim.Framework.User
|
namespace OpenSim.Framework.User
|
||||||
{
|
{
|
||||||
|
@ -38,8 +39,15 @@ namespace OpenSim.Framework.User
|
||||||
|
|
||||||
public void InitSessionData()
|
public void InitSessionData()
|
||||||
{
|
{
|
||||||
CurrentSessionID = LLUUID.Random();
|
|
||||||
CurrentSecureSessionID = LLUUID.Random();
|
System.Security.Cryptography.Rfc2898DeriveBytes b = new Rfc2898DeriveBytes(MD5passwd, 128);
|
||||||
|
|
||||||
|
RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider();
|
||||||
|
|
||||||
|
CurrentSessionID = new LLUUID();
|
||||||
|
CurrentSecureSessionID = new LLUUID();
|
||||||
|
rand.GetBytes(CurrentSecureSessionID.Data);
|
||||||
|
rand.GetBytes(CurrentSessionID.Data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddSimCircuit(uint circuitCode, LLUUID regionUUID)
|
public void AddSimCircuit(uint circuitCode, LLUUID regionUUID)
|
||||||
|
|
Loading…
Reference in New Issue