2#ifndef _security_cryptography_rng_h
3#define _security_cryptography_rng_h
7#include <system/object.h>
8#include <system/array.h>
9#include <system/details/array_view.h>
10#include <system/details/stack_array.h>
12namespace System {
namespace Security {
namespace Cryptography {
42 virtual ASPOSECPP_SHARED_API
void GetBytes(System::Details::ArrayView<uint8_t> bytes);
47 virtual ASPOSECPP_SHARED_API
void GetBytes(System::Details::ArrayView<uint8_t> bytes,
int offset,
int count);
50 virtual ASPOSECPP_SHARED_API
void GetNonZeroBytes(System::Details::ArrayView<uint8_t> bytes);
53 template<std::
size_t N>
inline void GetBytes(System::Details::StackArray<uint8_t, N> &bytes)
55 GetBytes(
static_cast<System::Details::ArrayView<uint8_t>
>(bytes));
61 template<std::
size_t N>
inline void GetBytes(System::Details::StackArray<uint8_t, N> &bytes,
int offset,
int count)
63 GetBytes(
static_cast<System::Details::ArrayView<uint8_t>
>(bytes), offset, count);
67 template<std::
size_t N>
inline void GetNonZeroBytes(System::Details::StackArray<uint8_t, N> &bytes)
69 GetNonZeroBytes(
static_cast<System::Details::ArrayView<uint8_t>
>(bytes));
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
Abstract class for random number generators to inherit from. Objects of this class should only be all...
Definition: random_number_generator.h:19
virtual void GetNonZeroBytes(ArrayPtr< uint8_t > bytes)
Fills existing array elements with random non-zero bytes.
virtual void GetNonZeroBytes(System::Details::ArrayView< uint8_t > bytes)
Fills existing array view elements with random non-zero bytes.
virtual void GetBytes(System::Details::ArrayView< uint8_t > bytes, int offset, int count)
Fills existing array view slice with random bytes.
static System::SharedPtr< RandomNumberGenerator > Create()
Creates an instance of the default implementation of a cryptographic random number generator that can...
virtual void GetBytes(ArrayPtr< uint8_t > bytes, int offset, int count)
Fills existing array slice with random bytes.
RandomNumberGenerator()
Constructor.
void GetNonZeroBytes(System::Details::StackArray< uint8_t, N > &bytes)
Fills existing stack array elements with random non-zero bytes.
Definition: random_number_generator.h:67
virtual void GetBytes(System::Details::ArrayView< uint8_t > bytes)
Fills existing array view elements with random bytes.
void GetBytes(System::Details::StackArray< uint8_t, N > &bytes)
Fills existing stack array elements with random bytes.
Definition: random_number_generator.h:53
void GetBytes(System::Details::StackArray< uint8_t, N > &bytes, int offset, int count)
Fills existing stack array slice with random bytes.
Definition: random_number_generator.h:61
virtual void GetBytes(ArrayPtr< uint8_t > bytes)=0
Fills existing array elements with random bytes.
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
Definition: db_command.h:9