public CkSsl3RandomData(byte[] clientRandom, byte[] serverRandom)
{
_lowLevelStruct.ClientRandom = IntPtr.Zero;
_lowLevelStruct.ClientRandomLen = 0;
_lowLevelStruct.ServerRandom = IntPtr.Zero;
_lowLevelStruct.ServerRandomLen = 0;
if (clientRandom != null)
{
_lowLevelStruct.ClientRandom = UnmanagedMemory.Allocate(clientRandom.Length);
UnmanagedMemory.Write(_lowLevelStruct.ClientRandom, clientRandom);
_lowLevelStruct.ClientRandomLen = Convert.ToUInt64(clientRandom.Length);
}
if (serverRandom != null)
{
_lowLevelStruct.ServerRandom = UnmanagedMemory.Allocate(serverRandom.Length);
UnmanagedMemory.Write(_lowLevelStruct.ServerRandom, serverRandom);
_lowLevelStruct.ServerRandomLen = Convert.ToUInt64(serverRandom.Length);
}
}