Xojo.Crypto.GenerateRandomBytes

From Xojo Documentation

Method

Xojo.Crypto.GenerateRandomBytes(byteCount As UInteger) As Xojo.Core.MemoryBlock

Supported for all project types and targets.

Generates a random block of data of the specified byteCount.

Sample Code

Dim mb1 As New Xojo.Core.MemoryBlock(1024)
mb1 = Xojo.Crypto.GenerateRandomBytes(1024)