CCF
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
ccf::crypto::IntelDRNG Class Reference

#include <entropy.h>

Inherits ccf::crypto::Entropy.

Public Member Functions

 IntelDRNG ()
 
std::vector< uint8_t > random (size_t len) override
 
uint64_t random64 () override
 
void random (unsigned char *data, size_t len) override
 
- Public Member Functions inherited from ccf::crypto::Entropy
 Entropy ()=default
 
virtual ~Entropy ()=default
 

Static Public Member Functions

static int rng (void *, unsigned char *output, size_t len)
 
static bool is_drng_supported ()
 

Constructor & Destructor Documentation

◆ IntelDRNG()

ccf::crypto::IntelDRNG::IntelDRNG ( )
inline

Member Function Documentation

◆ is_drng_supported()

static bool ccf::crypto::IntelDRNG::is_drng_supported ( )
inlinestatic

◆ random() [1/2]

std::vector< uint8_t > ccf::crypto::IntelDRNG::random ( size_t  len)
inlineoverridevirtual

Generate len random bytes

Parameters
lenNumber of random bytes to generate
Returns
vector random bytes

Implements ccf::crypto::Entropy.

◆ random() [2/2]

void ccf::crypto::IntelDRNG::random ( unsigned char *  data,
size_t  len 
)
inlineoverridevirtual

Generate len random bytes into data

Parameters
lenNumber of random bytes to generate
dataBuffer to fill

Implements ccf::crypto::Entropy.

◆ random64()

uint64_t ccf::crypto::IntelDRNG::random64 ( )
inlineoverridevirtual

Generate a random uint64_t

Returns
a random uint64_t

Implements ccf::crypto::Entropy.

◆ rng()

static int ccf::crypto::IntelDRNG::rng ( void *  ,
unsigned char *  output,
size_t  len 
)
inlinestatic

The documentation for this class was generated from the following file: