Android-cuttlefish cvd tool
Public Member Functions | Private Attributes | List of all members
cuttlefish::TpmSerializable< Type > Class Template Reference

#include <tpm_serialize.h>

Inheritance diagram for cuttlefish::TpmSerializable< Type >:
Inheritance graph
[legend]
Collaboration diagram for cuttlefish::TpmSerializable< Type >:
Collaboration graph
[legend]

Public Member Functions

 TpmSerializable (Type *)
 
size_t SerializedSize () const override
 
uint8_t * Serialize (uint8_t *buf, const uint8_t *end) const override
 
bool Deserialize (const uint8_t **buf_ptr, const uint8_t *end) override
 

Private Attributes

Type * instance_
 

Detailed Description

template<typename Type>
class cuttlefish::TpmSerializable< Type >

An implementation of a keymaster::Serializable type that refers to a TPM type by an unmanaged pointer. When the TpmSerializable serializes or deserializes data, it loads it from and saves it to the pointed at instance.

The serialization format is the same as the one used in the command protocol for TPM messages.

This is a template class, specialized in the corresponding implementation file for the TPM types necessary to serialize as part of larger Keymaster serializable types.

Constructor & Destructor Documentation

◆ TpmSerializable()

template<typename Type >
cuttlefish::TpmSerializable< T >::TpmSerializable ( Type *  )

Member Function Documentation

◆ Deserialize()

template<typename T >
bool cuttlefish::TpmSerializable< T >::Deserialize ( const uint8_t **  buf_ptr,
const uint8_t *  end 
)
override

◆ Serialize()

template<typename T >
uint8_t * cuttlefish::TpmSerializable< T >::Serialize ( uint8_t *  buf,
const uint8_t *  end 
) const
override

◆ SerializedSize()

template<typename T >
size_t cuttlefish::TpmSerializable< T >::SerializedSize
override

Member Data Documentation

◆ instance_

template<typename Type >
Type* cuttlefish::TpmSerializable< Type >::instance_
private

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