Package tss.tpm

Class TPMS_PCR_SELECTION

  • All Implemented Interfaces:
    TpmMarshaller

    public class TPMS_PCR_SELECTION
    extends TpmStructure
    Table 94 Definition of TPMS_PCR_SELECTION Structure
    • Field Detail

      • hash

        public TPM_ALG_ID hash
        The hash algorithm associated with the selection
      • pcrSelect

        public byte[] pcrSelect
        The bit map of selected PCR
    • Constructor Detail

      • TPMS_PCR_SELECTION

        public TPMS_PCR_SELECTION()
      • TPMS_PCR_SELECTION

        public TPMS_PCR_SELECTION​(TPM_ALG_ID _hash,
                                  byte[] _pcrSelect)
        Parameters:
        _hash - The hash algorithm associated with the selection
        _pcrSelect - The bit map of selected PCR
      • TPMS_PCR_SELECTION

        public TPMS_PCR_SELECTION​(TPM_ALG_ID pcrAlg,
                                  int pcrIndex)
        Create a PCR_SELECTION naming a single PCR
        Parameters:
        pcrAlg - The hash algorithm
        pcrIndex - The PCR index
      • TPMS_PCR_SELECTION

        public TPMS_PCR_SELECTION​(TPM_ALG_ID pcrAlg,
                                  int[] pcrIndices)
        Create a PCR_SELECTION from an array of PCRs in the same bank
        Parameters:
        pcrAlg - The hash algorithm
        pcrIndices - The PCRs to select
    • Method Detail

      • toTpm

        public byte[] toTpm()
        Deprecated.
        Returns:
        Wire (marshaled) representation of this object
      • fromBytes

        public static TPMS_PCR_SELECTION fromBytes​(byte[] byteBuf)
        Static marshaling helper
        Parameters:
        byteBuf - Wire representation of the object
        Returns:
        New object constructed from its wire representation
      • fromTpm

        public static TPMS_PCR_SELECTION fromTpm​(byte[] byteBuf)
        Deprecated.
        Use fromBytes(byte[]) instead
        Parameters:
        byteBuf - Wire representation of the object
        Returns:
        New object constructed from its wire representation
      • fromTpm

        public static TPMS_PCR_SELECTION fromTpm​(TpmBuffer buf)
        Static marshaling helper
        Parameters:
        buf - Wire representation of the object
        Returns:
        New object constructed from its wire representation
      • toStringInternal

        public void toStringInternal​(TpmStructurePrinter _p,
                                     int d)
        Description copied from class: TpmStructure
        Serialize this object to the structure printer
        Overrides:
        toStringInternal in class TpmStructure
        Parameters:
        _p - The structure accumulator
        d - The data to serialize
      • CreateSelectionArray

        public static TPMS_PCR_SELECTION[] CreateSelectionArray​(TPM_ALG_ID pcrAlg,
                                                                int pcrIndex)
        Create a PCR_SELECTION[] from a single PCR
        Parameters:
        pcrAlg - The hash algorithm
        pcrIndex - The PCR index
        Returns:
        A new selection array