Package tss.tpm

Class TPM2_EncryptDecrypt_REQUEST

  • All Implemented Interfaces:
    TpmMarshaller

    public class TPM2_EncryptDecrypt_REQUEST
    extends ReqStructure
    NOTE 1 This command is deprecated, and TPM2_EncryptDecrypt2() is preferred. This should be reflected in platform-specific specifications.
    • Field Detail

      • keyHandle

        public TPM_HANDLE keyHandle
        The symmetric key used for the operation Auth Index: 1 Auth Role: USER
      • decrypt

        public byte decrypt
        If YES, then the operation is decryption; if NO, the operation is encryption
      • mode

        public TPM_ALG_ID mode
        Symmetric encryption/decryption mode this field shall match the default mode of the key or be TPM_ALG_NULL.
      • ivIn

        public byte[] ivIn
        An initial value as required by the algorithm
      • inData

        public byte[] inData
        The data to be encrypted/decrypted
    • Constructor Detail

      • TPM2_EncryptDecrypt_REQUEST

        public TPM2_EncryptDecrypt_REQUEST()
      • TPM2_EncryptDecrypt_REQUEST

        public TPM2_EncryptDecrypt_REQUEST​(TPM_HANDLE _keyHandle,
                                           byte _decrypt,
                                           TPM_ALG_ID _mode,
                                           byte[] _ivIn,
                                           byte[] _inData)
        Parameters:
        _keyHandle - The symmetric key used for the operation Auth Index: 1 Auth Role: USER
        _decrypt - If YES, then the operation is decryption; if NO, the operation is encryption
        _mode - Symmetric encryption/decryption mode this field shall match the default mode of the key or be TPM_ALG_NULL.
        _ivIn - An initial value as required by the algorithm
        _inData - The data to be encrypted/decrypted
    • Method Detail

      • toTpm

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

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

        public static TPM2_EncryptDecrypt_REQUEST 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 TPM2_EncryptDecrypt_REQUEST 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
      • numHandles

        public int numHandles()
        Overrides:
        numHandles in class CmdStructure
        Returns:
        Number of TPM handles contained (as fields) in this data structure
      • numAuthHandles

        public int numAuthHandles()
        Overrides:
        numAuthHandles in class ReqStructure
        Returns:
        Number of authorization TPM handles contained in this data structure
      • getHandles

        public TPM_HANDLE[] getHandles()
        Overrides:
        getHandles in class ReqStructure
        Returns:
        An array of TPM handles contained in this TPM request data structure