Mono Class Library: System.Security.Cryptography.RandomNumberGenerator Overview | Members

System.Security.Cryptography.RandomNumberGenerator.GetNonZeroBytes Method

Fill the supplied buffer with random bytes excluding zeros (0x00).

public abstract void GetNonZeroBytes (byte[] data)

Parameters

data
The buffer to be filled with random bytes.

Remarks

Some cryptographic functions requires random that do not contain zeros. However this restriction do not apply to most application code so this method shouldn't be used.

Requirements

Namespace: System.Security.Cryptography
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0