Software APIs
Data Fields
template_state Struct Reference

Structure holding the state of the template engine. More...

#include <sw/device/silicon_creator/lib/cert/template.h>

Data Fields

const uint8_t * const_end
 
const uint8_t * out_begin
 
uint8_t * out_end
 

Detailed Description

Structure holding the state of the template engine.

The fields in this structure should be considered private and not be read or written directly.

The following diagram shows the pointers location during encoding. Takes Cdi0 TBS as as example:

Template Const Bytes: kTemplateConstBytes[] const_end + sizeof(kTemplateConstBytes) | Bytes Copied to Output | Unconsumed Template Const Bytes |

const_end pointer will start from offset zero, and increase to sizeof(kTemplateConstBytes) at the end of encoding.

Output Buffer: out_begin out_end + kCdi0MaxTbsSizeBytes | Used Bytes | Remaining Unused Space |

out_begin pointer will not change. out_end pointer starts from out_begin to the actual output size. The actual size is between [kCdi0MinTbsSizeBytes, kCdi0MaxTbsSizeBytes].

Definition at line 40 of file template.h.

Field Documentation

◆ const_end

const uint8_t* template_state::const_end

Definition at line 42 of file template.h.

◆ out_begin

const uint8_t* template_state::out_begin

Definition at line 44 of file template.h.

◆ out_end

uint8_t* template_state::out_end

Definition at line 46 of file template.h.