Struct tss_esapi::structures::PcrSelect
source · pub struct PcrSelect { /* private fields */ }Expand description
This module contains necessary representations of the items belonging to the TPMS_PCR_SELECT structure.
The minimum number of octets allowed in a TPMS_PCR_SELECT.sizeOfSelect is not determined by the number of PCR implemented but by the number of PCR required by the platform-specific specification with which the TPM is compliant or by the implementer if not adhering to a platform-specific specification.
Implementations§
source§impl PcrSelect
impl PcrSelect
sourcepub fn create(
pcr_select_size: PcrSelectSize,
pcr_slots: &[PcrSlot]
) -> Result<Self>
pub fn create(
pcr_select_size: PcrSelectSize,
pcr_slots: &[PcrSlot]
) -> Result<Self>
Creates a new PcrSelect
sourcepub fn size_of_select(&self) -> PcrSelectSize
pub fn size_of_select(&self) -> PcrSelectSize
Returns the size of the select.
NB! This is not the same as how many PcrSlot there are in the select but rather how many octets that are needed to hold the bit field that indicate what slots that are selected.
sourcepub fn selected_pcrs(&self) -> Vec<PcrSlot> ⓘ
pub fn selected_pcrs(&self) -> Vec<PcrSlot> ⓘ
Returns the selected PCRs in the select.