WriteUInt32() public static method

public static WriteUInt32 ( uint value, byte buffer, int offset ) : int
value uint
buffer byte
offset int
return int
Example #1
0
        public static void CreateRandomData(byte[] buffer, int offset)
        {
            uint unixTime = (uint)((DateTime.UtcNow.Ticks - UnixTimeStart) / TimeSpan.TicksPerSecond);

            BitConverterBE.WriteUInt32(unixTime, buffer, offset);
            lock (_randBuffer) {
                RNG.GetBytes(_randBuffer);
                Buffer.BlockCopy(_randBuffer, 0, buffer, offset + 4, _randBuffer.Length);
            }
        }