Skip to content

NextBytes Method ​

Definition ​

  • Namespace: JASE
  • Assembly: JASE.dll

Overloads ​

NameDescription
byte[] NextBytes(int count)Returns a new array of the specified length filled with random bytes.
void NextBytes(Span<byte> buffer)Fills the elements of a specified array of bytes with random numbers.

byte[] NextBytes(int count) ​

csharp
byte[] NextBytes(int count)

Returns a new array of the specified length filled with random bytes.

Parameters ​

NameDescription
countThe number of random bytes to generate. Must be greater than or equal to 0.

Returns ​

A byte array of length count whose elements are uniformly random values between 0x00 and 0xFF.

void NextBytes(Span<byte> buffer) ​

csharp
void NextBytes(Span<byte> buffer)

Fills the elements of a specified array of bytes with random numbers.

Parameters ​

NameDescription
bufferAn array of bytes to contain random numbers.