Android-cuttlefish cvd tool
Public Member Functions | Private Attributes | List of all members
cuttlefish::TpmRandomSource Class Reference

#include <tpm_random_source.h>

Inheritance diagram for cuttlefish::TpmRandomSource:
Inheritance graph
[legend]
Collaboration diagram for cuttlefish::TpmRandomSource:
Collaboration graph
[legend]

Public Member Functions

 TpmRandomSource (TpmResourceManager &resource_manager)
 
virtual ~TpmRandomSource ()=default
 
keymaster_error_t GenerateRandom (uint8_t *buffer, size_t length) const override
 
keymaster_error_t AddRngEntropy (const uint8_t *, size_t) const
 

Private Attributes

TpmResourceManagerresource_manager_
 

Detailed Description

Secure random number generator, pulling data from a TPM.

RandomSource is used by the OpenSSL HMAC key and AES key implementations.

Constructor & Destructor Documentation

◆ TpmRandomSource()

cuttlefish::TpmRandomSource::TpmRandomSource ( TpmResourceManager resource_manager)

◆ ~TpmRandomSource()

virtual cuttlefish::TpmRandomSource::~TpmRandomSource ( )
virtualdefault

Member Function Documentation

◆ AddRngEntropy()

keymaster_error_t cuttlefish::TpmRandomSource::AddRngEntropy ( const uint8_t *  buffer,
size_t  size 
) const

◆ GenerateRandom()

keymaster_error_t cuttlefish::TpmRandomSource::GenerateRandom ( uint8_t *  buffer,
size_t  length 
) const
override

Member Data Documentation

◆ resource_manager_

TpmResourceManager& cuttlefish::TpmRandomSource::resource_manager_
private

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