#include <secure_random.h>
Class for generating cryptographically strong random sequences. The following systems are used:
◆ MAXON_INTERFACE_NONVIRTUAL()
◆ GetDefaultProvider()
Gets a provider for the CSPRNG.
- Returns
- The provider. If the return value is nullptr the function failed.
◆ GetRandomNumber()
Gets a provider for the CSPRNG.
- Returns
- The provider. If the return value is nullptr the function failed. Fills the buffer with cryptographically strong random bytes. example: SecureRandom::GetRandomNumber(provider, ToBlock<Byte>(certificateBuffer, SIZEOF(certificateBuffer)));
- Parameters
-
[in] | provider | The secure random provider. |
[in] | buffer | A pointer to a buffer that is to be filled. |
- Returns
- True, if the buffer was filled successfully, false otherwise.