System::Security::Cryptography::RandomNumberGenerator class

RandomNumberGenerator class

Abstract class for random number generators to inherit from. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

class RandomNumberGenerator : public virtual System::Object

Methods

MethodDescription
static Create()Creates an instance of the default implementation of a cryptographic random number generator that can be used to generate random data. Not implemented.
virtual GetBytes(ArrayPtr<uint8_t>)Fills existing array elements with random bytes.
virtual GetBytes(ArrayPtr<uint8_t>, int, int)Fills existing array slice with random bytes.
virtual GetBytes(System::Details::ArrayView<uint8_t>)Fills existing array view elements with random bytes.
virtual GetBytes(System::Details::ArrayView<uint8_t>, int, int)Fills existing array view slice with random bytes.
GetBytes(System::Details::StackArray<uint8_t, N>&)Fills existing stack array elements with random bytes.
GetBytes(System::Details::StackArray<uint8_t, N>&, int, int)Fills existing stack array slice with random bytes.
virtual GetNonZeroBytes(ArrayPtr<uint8_t>)Fills existing array elements with random non-zero bytes.
virtual GetNonZeroBytes(System::Details::ArrayView<uint8_t>)Fills existing array view elements with random non-zero bytes.
GetNonZeroBytes(System::Details::StackArray<uint8_t, N>&)Fills existing stack array elements with random non-zero bytes.

See Also