# Constants

This module contains all the constant values from the following TCG specifications:

- https://trustedcomputinggroup.org/resource/tpm-library-specification/. See Part 2 “Structures”.

- https://trustedcomputinggroup.org/resource/tss-overview-common-structures-specification

Along with helpers to go from string values to constants and constant values to string values.

class tpm2_pytss.constants.ESYS_TR

  ESYS_TR is an ESAPI identifier representing a TPM resource

  To get the ESYS_TR identifier for a persistent handle, such as a NV area or a persistent key use `tpm2_pytss.ESAPI.tr_from_tpmpublic()`

  ENDORSEMENT = ESYS_TR.RH_ENDORSEMENT
  LOCKOUT = ESYS_TR.RH_LOCKOUT
  NONE = ESYS_TR.NONE
  NULL = ESYS_TR.RH_NULL
  OWNER = ESYS_TR.RH_OWNER
  PASSWORD = ESYS_TR.PASSWORD
  PCR0 = ESYS_TR.PCR0
  PCR1 = ESYS_TR.PCR1
  PCR10 = ESYS_TR.PCR10
  PCR11 = ESYS_TR.PCR11
  PCR12 = ESYS_TR.PCR12
  PCR13 = ESYS_TR.PCR13
  PCR14 = ESYS_TR.PCR14
  PCR15 = ESYS_TR.PCR15
  PCR16 = ESYS_TR.PCR16
  PCR17 = ESYS_TR.PCR17
  PCR18 = ESYS_TR.PCR18
  PCR19 = ESYS_TR.PCR19
  PCR2 = ESYS_TR.PCR2
  PCR20 = ESYS_TR.PCR20
  PCR21 = ESYS_TR.PCR21
  PCR22 = ESYS_TR.PCR22
  PCR23 = ESYS_TR.PCR23
  PCR24 = ESYS_TR.PCR24
  PCR25 = ESYS_TR.PCR25
  PCR26 = ESYS_TR.PCR26
  PCR27 = ESYS_TR.PCR27
  PCR28 = ESYS_TR.PCR28
  PCR29 = ESYS_TR.PCR29
  PCR3 = ESYS_TR.PCR3
  PCR30 = ESYS_TR.PCR30
  PCR31 = ESYS_TR.PCR31
  PCR4 = ESYS_TR.PCR4
  PCR5 = ESYS_TR.PCR5
  PCR6 = ESYS_TR.PCR6
  PCR7 = ESYS_TR.PCR7
  PCR8 = ESYS_TR.PCR8
  PCR9 = ESYS_TR.PCR9
  PLATFORM = ESYS_TR.RH_PLATFORM
  PLATFORM_NV = ESYS_TR.RH_PLATFORM_NV
  RH_ENDORSEMENT = ESYS_TR.RH_ENDORSEMENT
  RH_LOCKOUT = ESYS_TR.RH_LOCKOUT
  RH_NULL = ESYS_TR.RH_NULL
  RH_OWNER = ESYS_TR.RH_OWNER
  RH_PLATFORM = ESYS_TR.RH_PLATFORM
  RH_PLATFORM_NV = ESYS_TR.RH_PLATFORM_NV
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  close(ectx)

    Same as see tpm2_pytss.ESAPI.tr_close

    Parameters:

      ectx (ESAPI) – The esapi context to close the ESYS_TR on.

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  static deserialize(ectx, buffer)

    Same as see tpm2_pytss.ESAPI.tr_derialize

    Parameters:

      ectx (ESAPI) – The esapi context to load the ESYS_TR on.

    Returns:

      An ESYS_TR representing the TPM object.

  get_name(ectx)

    Same as see tpm2_pytss.ESAPI.tr_get_name

    Parameters:

      ectx (ESAPI) – The esapi context to retrieve the object name from.

    Returns:

      A TPM2B_NAME object.

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  static parts_to_blob(handle, public)

    Converts a persistent handle and public to a serialized ESYS_TR.

    Parameters:

      - handle (TPM2_HANDLE) – The PERSISTENT handle to convert.

      - public (TPM2B_PUBLIC) – The corresponding public for the handle.

    Returns:

      A SERIALIZED ESYS_TR that can be used with ESYS_TR.deserialize later.

  serialize(ectx)

    Same as see tpm2_pytss.ESAPI.tr_serialize

    Parameters:

      - ectx (ESAPI) – The esapi context the ESYS_TR was created

      - from.

    Returns:

      A byte array of the serialized ESYS_TR.

  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.FAPI_ESYSBLOB
  CONTEXTLOAD = 1
  DESERIALIZE = 2
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_ALG
  AES = TPM2_ALG_AES
  CAMELLIA = TPM2_ALG_CAMELLIA
  CBC = TPM2_ALG_CBC
  CFB = TPM2_ALG_CFB
  CTR = TPM2_ALG_CTR
  ECB = TPM2_ALG_ECB
  ECC = TPM2_ALG_ECC
  ECDAA = TPM2_ALG_ECDAA
  ECDH = TPM2_ALG_ECDH
  ECDSA = TPM2_ALG_ECDSA
  ECMQV = TPM2_ALG_ECMQV
  ECSCHNORR = TPM2_ALG_ECSCHNORR
  ERROR = TPM2_ALG_ERROR
  FIRST = TPM2_ALG_FIRST
  HMAC = TPM2_ALG_HMAC
  KDF1_SP800_108 = TPM2_ALG_KDF1_SP800_108
  KDF1_SP800_56A = TPM2_ALG_KDF1_SP800_56A
  KDF2 = TPM2_ALG_KDF2
  KEYEDHASH = TPM2_ALG_KEYEDHASH
  LAST = TPM2_ALG_LAST
  MGF1 = TPM2_ALG_MGF1
  NULL = TPM2_ALG_NULL
  OAEP = TPM2_ALG_OAEP
  OFB = TPM2_ALG_OFB
  RSA = TPM2_ALG_RSA
  RSAES = TPM2_ALG_RSAES
  RSAPSS = TPM2_ALG_RSAPSS
  RSASSA = TPM2_ALG_RSASSA
  SHA = TPM2_ALG_SHA
  SHA1 = TPM2_ALG_SHA1
  SHA256 = TPM2_ALG_SHA256
  SHA384 = TPM2_ALG_SHA384
  SHA3_256 = TPM2_ALG_SHA3_256
  SHA3_384 = TPM2_ALG_SHA3_384
  SHA3_512 = TPM2_ALG_SHA3_512
  SHA512 = TPM2_ALG_SHA512
  SM2 = TPM2_ALG_SM2
  SM3_256 = TPM2_ALG_SM3_256
  SM4 = TPM2_ALG_SM4
  SYMCIPHER = TPM2_ALG_SYMCIPHER
  TDES = TPM2_ALG_TDES
  XOR = TPM2_ALG_XOR
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_ALG_ID
  AES = TPM2_ALG_AES
  CAMELLIA = TPM2_ALG_CAMELLIA
  CBC = TPM2_ALG_CBC
  CFB = TPM2_ALG_CFB
  CTR = TPM2_ALG_CTR
  ECB = TPM2_ALG_ECB
  ECC = TPM2_ALG_ECC
  ECDAA = TPM2_ALG_ECDAA
  ECDH = TPM2_ALG_ECDH
  ECDSA = TPM2_ALG_ECDSA
  ECMQV = TPM2_ALG_ECMQV
  ECSCHNORR = TPM2_ALG_ECSCHNORR
  ERROR = TPM2_ALG_ERROR
  FIRST = TPM2_ALG_FIRST
  HMAC = TPM2_ALG_HMAC
  KDF1_SP800_108 = TPM2_ALG_KDF1_SP800_108
  KDF1_SP800_56A = TPM2_ALG_KDF1_SP800_56A
  KDF2 = TPM2_ALG_KDF2
  KEYEDHASH = TPM2_ALG_KEYEDHASH
  LAST = TPM2_ALG_LAST
  MGF1 = TPM2_ALG_MGF1
  NULL = TPM2_ALG_NULL
  OAEP = TPM2_ALG_OAEP
  OFB = TPM2_ALG_OFB
  RSA = TPM2_ALG_RSA
  RSAES = TPM2_ALG_RSAES
  RSAPSS = TPM2_ALG_RSAPSS
  RSASSA = TPM2_ALG_RSASSA
  SHA = TPM2_ALG_SHA
  SHA1 = TPM2_ALG_SHA1
  SHA256 = TPM2_ALG_SHA256
  SHA384 = TPM2_ALG_SHA384
  SHA3_256 = TPM2_ALG_SHA3_256
  SHA3_384 = TPM2_ALG_SHA3_384
  SHA3_512 = TPM2_ALG_SHA3_512
  SHA512 = TPM2_ALG_SHA512
  SM2 = TPM2_ALG_SM2
  SM3_256 = TPM2_ALG_SM3_256
  SM4 = TPM2_ALG_SM4
  SYMCIPHER = TPM2_ALG_SYMCIPHER
  TDES = TPM2_ALG_TDES
  XOR = TPM2_ALG_XOR
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_CAP
  ALGS = TPM2_CAP_ALGS
  AUDIT_COMMANDS = TPM2_CAP_AUDIT_COMMANDS
  COMMANDS = TPM2_CAP_COMMANDS
  ECC_CURVES = TPM2_CAP_ECC_CURVES
  FIRST = TPM2_CAP_FIRST
  HANDLES = TPM2_CAP_HANDLES
  LAST = TPM2_CAP_LAST
  PCRS = TPM2_CAP_PCRS
  PCR_PROPERTIES = TPM2_CAP_PCR_PROPERTIES
  PP_COMMANDS = TPM2_CAP_PP_COMMANDS
  TPM_PROPERTIES = TPM2_CAP_TPM_PROPERTIES
  VENDOR_PROPERTY = TPM2_CAP_VENDOR_PROPERTY
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_CC
  AC_GetCapability = TPM2_CC_AC_GetCapability
  AC_Send = TPM2_CC_AC_Send
  ActivateCredential = TPM2_CC_ActivateCredential
  Certify = TPM2_CC_Certify
  CertifyCreation = TPM2_CC_CertifyCreation
  ChangeEPS = TPM2_CC_ChangeEPS
  ChangePPS = TPM2_CC_ChangePPS
  Clear = TPM2_CC_Clear
  ClearControl = TPM2_CC_ClearControl
  ClockRateAdjust = TPM2_CC_ClockRateAdjust
  ClockSet = TPM2_CC_ClockSet
  Commit = TPM2_CC_Commit
  ContextLoad = TPM2_CC_ContextLoad
  ContextSave = TPM2_CC_ContextSave
  Create = TPM2_CC_Create
  CreateLoaded = TPM2_CC_CreateLoaded
  CreatePrimary = TPM2_CC_CreatePrimary
  DictionaryAttackLockReset = TPM2_CC_DictionaryAttackLockReset
  DictionaryAttackParameters = TPM2_CC_DictionaryAttackParameters
  Duplicate = TPM2_CC_Duplicate
  ECC_Parameters = TPM2_CC_ECC_Parameters
  ECDH_KeyGen = TPM2_CC_ECDH_KeyGen
  ECDH_ZGen = TPM2_CC_ECDH_ZGen
  EC_Ephemeral = TPM2_CC_EC_Ephemeral
  EncryptDecrypt = TPM2_CC_EncryptDecrypt
  EncryptDecrypt2 = TPM2_CC_EncryptDecrypt2
  EventSequenceComplete = TPM2_CC_EventSequenceComplete
  EvictControl = TPM2_CC_EvictControl
  FIRST = TPM2_CC_FIRST
  FieldUpgradeData = TPM2_CC_FieldUpgradeData
  FieldUpgradeStart = TPM2_CC_FieldUpgradeStart
  FirmwareRead = TPM2_CC_FirmwareRead
  FlushContext = TPM2_CC_FlushContext
  GetCapability = TPM2_CC_GetCapability
  GetCommandAuditDigest = TPM2_CC_GetCommandAuditDigest
  GetRandom = TPM2_CC_GetRandom
  GetSessionAuditDigest = TPM2_CC_GetSessionAuditDigest
  GetTestResult = TPM2_CC_GetTestResult
  GetTime = TPM2_CC_GetTime
  HMAC = TPM2_CC_HMAC
  HMAC_Start = TPM2_CC_HMAC_Start
  Hash = TPM2_CC_Hash
  HashSequenceStart = TPM2_CC_HashSequenceStart
  HierarchyChangeAuth = TPM2_CC_HierarchyChangeAuth
  HierarchyControl = TPM2_CC_HierarchyControl
  Import = TPM2_CC_Import
  IncrementalSelfTest = TPM2_CC_IncrementalSelfTest
  LAST = TPM2_CC_LAST
  Load = TPM2_CC_Load
  LoadExternal = TPM2_CC_LoadExternal
  MakeCredential = TPM2_CC_MakeCredential
  NV_Certify = TPM2_CC_NV_Certify
  NV_ChangeAuth = TPM2_CC_NV_ChangeAuth
  NV_DefineSpace = TPM2_CC_NV_DefineSpace
  NV_Extend = TPM2_CC_NV_Extend
  NV_GlobalWriteLock = TPM2_CC_NV_GlobalWriteLock
  NV_Increment = TPM2_CC_NV_Increment
  NV_Read = TPM2_CC_NV_Read
  NV_ReadLock = TPM2_CC_NV_ReadLock
  NV_ReadPublic = TPM2_CC_NV_ReadPublic
  NV_SetBits = TPM2_CC_NV_SetBits
  NV_UndefineSpace = TPM2_CC_NV_UndefineSpace
  NV_UndefineSpaceSpecial = TPM2_CC_NV_UndefineSpaceSpecial
  NV_Write = TPM2_CC_NV_Write
  NV_WriteLock = TPM2_CC_NV_WriteLock
  ObjectChangeAuth = TPM2_CC_ObjectChangeAuth
  PCR_Allocate = TPM2_CC_PCR_Allocate
  PCR_Event = TPM2_CC_PCR_Event
  PCR_Extend = TPM2_CC_PCR_Extend
  PCR_Read = TPM2_CC_PCR_Read
  PCR_Reset = TPM2_CC_PCR_Reset
  PCR_SetAuthPolicy = TPM2_CC_PCR_SetAuthPolicy
  PCR_SetAuthValue = TPM2_CC_PCR_SetAuthValue
  PP_Commands = TPM2_CC_PP_Commands
  PolicyAuthValue = TPM2_CC_PolicyAuthValue
  PolicyAuthorize = TPM2_CC_PolicyAuthorize
  PolicyAuthorizeNV = TPM2_CC_PolicyAuthorizeNV
  PolicyCommandCode = TPM2_CC_PolicyCommandCode
  PolicyCounterTimer = TPM2_CC_PolicyCounterTimer
  PolicyCpHash = TPM2_CC_PolicyCpHash
  PolicyDuplicationSelect = TPM2_CC_PolicyDuplicationSelect
  PolicyGetDigest = TPM2_CC_PolicyGetDigest
  PolicyLocality = TPM2_CC_PolicyLocality
  PolicyNV = TPM2_CC_PolicyNV
  PolicyNameHash = TPM2_CC_PolicyNameHash
  PolicyNvWritten = TPM2_CC_PolicyNvWritten
  PolicyOR = TPM2_CC_PolicyOR
  PolicyPCR = TPM2_CC_PolicyPCR
  PolicyPassword = TPM2_CC_PolicyPassword
  PolicyPhysicalPresence = TPM2_CC_PolicyPhysicalPresence
  PolicyRestart = TPM2_CC_PolicyRestart
  PolicySecret = TPM2_CC_PolicySecret
  PolicySigned = TPM2_CC_PolicySigned
  PolicyTemplate = TPM2_CC_PolicyTemplate
  PolicyTicket = TPM2_CC_PolicyTicket
  Policy_AC_SendSelect = TPM2_CC_Policy_AC_SendSelect
  Quote = TPM2_CC_Quote
  RSA_Decrypt = TPM2_CC_RSA_Decrypt
  RSA_Encrypt = TPM2_CC_RSA_Encrypt
  ReadClock = TPM2_CC_ReadClock
  ReadPublic = TPM2_CC_ReadPublic
  Rewrap = TPM2_CC_Rewrap
  SelfTest = TPM2_CC_SelfTest
  SequenceComplete = TPM2_CC_SequenceComplete
  SequenceUpdate = TPM2_CC_SequenceUpdate
  SetAlgorithmSet = TPM2_CC_SetAlgorithmSet
  SetCommandCodeAuditStatus = TPM2_CC_SetCommandCodeAuditStatus
  SetPrimaryPolicy = TPM2_CC_SetPrimaryPolicy
  Shutdown = TPM2_CC_Shutdown
  Sign = TPM2_CC_Sign
  StartAuthSession = TPM2_CC_StartAuthSession
  Startup = TPM2_CC_Startup
  StirRandom = TPM2_CC_StirRandom
  TestParms = TPM2_CC_TestParms
  Unseal = TPM2_CC_Unseal
  Vendor_TCG_Test = TPM2_CC_Vendor_TCG_Test
  VerifySignature = TPM2_CC_VerifySignature
  ZGen_2Phase = TPM2_CC_ZGen_2Phase
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_CLOCK
  COARSE_FASTER = TPM2_CLOCK_COARSE_FASTER
  COARSE_SLOWER = TPM2_CLOCK_COARSE_SLOWER
  FINE_FASTER = TPM2_CLOCK_FINE_FASTER
  FINE_SLOWER = TPM2_CLOCK_FINE_SLOWER
  MEDIUM_FASTER = TPM2_CLOCK_MEDIUM_FASTER
  MEDIUM_SLOWER = TPM2_CLOCK_MEDIUM_SLOWER
  NO_CHANGE = TPM2_CLOCK_NO_CHANGE
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_CLOCK_ADJUST
  COARSE_FASTER = TPM2_CLOCK_COARSE_FASTER
  COARSE_SLOWER = TPM2_CLOCK_COARSE_SLOWER
  FINE_FASTER = TPM2_CLOCK_FINE_FASTER
  FINE_SLOWER = TPM2_CLOCK_FINE_SLOWER
  MEDIUM_FASTER = TPM2_CLOCK_MEDIUM_FASTER
  MEDIUM_SLOWER = TPM2_CLOCK_MEDIUM_SLOWER
  NO_CHANGE = TPM2_CLOCK_NO_CHANGE
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_ECC
  BN_P256 = TPM2_ECC_BN_P256
  BN_P638 = TPM2_ECC_BN_P638
  NIST_P192 = TPM2_ECC_NIST_P192
  NIST_P224 = TPM2_ECC_NIST_P224
  NIST_P256 = TPM2_ECC_NIST_P256
  NIST_P384 = TPM2_ECC_NIST_P384
  NIST_P521 = TPM2_ECC_NIST_P521
  NONE = TPM2_ECC_NONE
  SM2_P256 = TPM2_ECC_SM2_P256
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_ECC_CURVE
  BN_P256 = TPM2_ECC_BN_P256
  BN_P638 = TPM2_ECC_BN_P638
  NIST_P192 = TPM2_ECC_NIST_P192
  NIST_P224 = TPM2_ECC_NIST_P224
  NIST_P256 = TPM2_ECC_NIST_P256
  NIST_P384 = TPM2_ECC_NIST_P384
  NIST_P521 = TPM2_ECC_NIST_P521
  NONE = TPM2_ECC_NONE
  SM2_P256 = TPM2_ECC_SM2_P256
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_EO
  BITCLEAR = TPM2_EO_BITCLEAR
  BITSET = TPM2_EO_BITSET
  EQ = TPM2_EO_EQ
  NEQ = TPM2_EO_NEQ
  SIGNED_GE = TPM2_EO_SIGNED_GE
  SIGNED_GT = TPM2_EO_SIGNED_GT
  SIGNED_LE = TPM2_EO_SIGNED_LE
  SIGNED_LT = TPM2_EO_SIGNED_LT
  UNSIGNED_GE = TPM2_EO_UNSIGNED_GE
  UNSIGNED_GT = TPM2_EO_UNSIGNED_GT
  UNSIGNED_LE = TPM2_EO_UNSIGNED_LE
  UNSIGNED_LT = TPM2_EO_UNSIGNED_LT
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_GENERATED
  VALUE = TPM2_GENERATED_VALUE
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_HC
  ACTIVE_SESSION_FIRST = TPM2_ACTIVE_SESSION_FIRST
  ACTIVE_SESSION_LAST = TPM2_ACTIVE_SESSION_LAST
  HMAC_SESSION_FIRST = TPM2_HMAC_SESSION_FIRST
  HMAC_SESSION_LAST = TPM2_HMAC_SESSION_LAST
  HR_HANDLE_MASK = TPM2_HR_HANDLE_MASK
  HR_HMAC_SESSION = TPM2_HR_HMAC_SESSION
  HR_NV_INDEX = TPM2_HR_NV_INDEX
  HR_PCR = TPM2_HR_PCR
  HR_PERMANENT = TPM2_HR_PERMANENT
  HR_PERSISTENT = TPM2_HR_PERSISTENT
  HR_POLICY_SESSION = TPM2_HR_POLICY_SESSION
  HR_RANGE_MASK = TPM2_HR_RANGE_MASK
  HR_SHIFT = TPM2_HR_SHIFT
  HR_TRANSIENT = TPM2_HR_TRANSIENT
  LOADED_SESSION_FIRST = TPM2_LOADED_SESSION_FIRST
  LOADED_SESSION_LAST = TPM2_LOADED_SESSION_LAST
  NV_INDEX_FIRST = TPM2_NV_INDEX_FIRST
  NV_INDEX_LAST = TPM2_NV_INDEX_LAST
  PCR_FIRST = TPM2_PCR_FIRST
  PCR_LAST = TPM2_PCR_LAST
  PERMANENT_FIRST = TPM2_PERMANENT_FIRST
  PERMANENT_LAST = TPM2_PERMANENT_LAST
  PERSISTENT_FIRST = TPM2_PERSISTENT_FIRST
  PERSISTENT_LAST = TPM2_PERSISTENT_LAST
  PLATFORM_PERSISTENT = TPM2_PLATFORM_PERSISTENT
  POLICY_SESSION_FIRST = TPM2_POLICY_SESSION_FIRST
  POLICY_SESSION_LAST = TPM2_POLICY_SESSION_LAST
  TRANSIENT_FIRST = TPM2_TRANSIENT_FIRST
  TRANSIENT_LAST = TPM2_TRANSIENT_LAST
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_HR
  HANDLE_MASK = TPM2_HR_HANDLE_MASK
  HMAC_SESSION = TPM2_HR_HMAC_SESSION
  NV_INDEX = TPM2_HR_NV_INDEX
  PCR = TPM2_HR_PCR
  PERMANENT = TPM2_HR_PERMANENT
  PERSISTENT = TPM2_HR_PERSISTENT
  POLICY_SESSION = TPM2_HR_POLICY_SESSION
  RANGE_MASK = TPM2_HR_RANGE_MASK
  SHIFT = TPM2_HR_SHIFT
  TRANSIENT = TPM2_HR_TRANSIENT
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_HT
  HMAC_SESSION = TPM2_HT_HMAC_SESSION
  LOADED_SESSION = TPM2_HT_LOADED_SESSION
  NV_INDEX = TPM2_HT_NV_INDEX
  PCR = TPM2_HT_PCR
  PERMANENT = TPM2_HT_PERMANENT
  PERSISTENT = TPM2_HT_PERSISTENT
  POLICY_SESSION = TPM2_HT_POLICY_SESSION
  SAVED_SESSION = TPM2_HT_SAVED_SESSION
  TRANSIENT = TPM2_HT_TRANSIENT
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_MAX
  ALG_LIST_SIZE = TPM2_MAX_ALG_LIST_SIZE
  CAP_BUFFER = TPM2_MAX_CAP_BUFFER
  CAP_CC = TPM2_MAX_CAP_CC
  CONTEXT_SIZE = TPM2_MAX_CONTEXT_SIZE
  DIGEST_BUFFER = TPM2_MAX_DIGEST_BUFFER
  NV_BUFFER_SIZE = TPM2_MAX_NV_BUFFER_SIZE
  PCRS = TPM2_MAX_PCRS
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_NT
  BITS = TPM2_NT_BITS
  COUNTER = TPM2_NT_COUNTER
  EXTEND = TPM2_NT_EXTEND
  ORDINARY = TPM2_NT_ORDINARY
  PIN_FAIL = TPM2_NT_PIN_FAIL
  PIN_PASS = TPM2_NT_PIN_PASS
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_PS
  AUTHENTICATION = TPM2_PS_AUTHENTICATION
  CELL_PHONE = TPM2_PS_CELL_PHONE
  EMBEDDED = TPM2_PS_EMBEDDED
  HARDCOPY = TPM2_PS_HARDCOPY
  INFRASTRUCTURE = TPM2_PS_INFRASTRUCTURE
  MAIN = TPM2_PS_MAIN
  MULTI_TENANT = TPM2_PS_MULTI_TENANT
  PC = TPM2_PS_PC
  PDA = TPM2_PS_PDA
  PERIPHERAL = TPM2_PS_PERIPHERAL
  SERVER = TPM2_PS_SERVER
  STORAGE = TPM2_PS_STORAGE
  TC = TPM2_PS_TC
  TNC = TPM2_PS_TNC
  TSS = TPM2_PS_TSS
  VIRTUALIZATION = TPM2_PS_VIRTUALIZATION
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_PT
  ACTIVE_SESSIONS_MAX = TPM2_PT_ACTIVE_SESSIONS_MAX
  ALGORITHM_SET = TPM2_PT_ALGORITHM_SET
  CLOCK_UPDATE = TPM2_PT_CLOCK_UPDATE
  CONTEXT_GAP_MAX = TPM2_PT_CONTEXT_GAP_MAX
  DAY_OF_YEAR = TPM2_PT_DAY_OF_YEAR
  FAMILY_INDICATOR = TPM2_PT_FAMILY_INDICATOR
  FIXED = TPM2_PT_FIXED
  GROUP = TPM2_PT_GROUP
  INPUT_BUFFER = TPM2_PT_INPUT_BUFFER
  LEVEL = TPM2_PT_LEVEL
  LIBRARY_COMMANDS = TPM2_PT_LIBRARY_COMMANDS
  LOADED_CURVES = TPM2_PT_LOADED_CURVES
  LOCKOUT_COUNTER = TPM2_PT_LOCKOUT_COUNTER
  LOCKOUT_INTERVAL = TPM2_PT_LOCKOUT_INTERVAL
  LOCKOUT_RECOVERY = TPM2_PT_LOCKOUT_RECOVERY
  MANUFACTURER = TPM2_PT_MANUFACTURER
  MAX_AUTH_FAIL = TPM2_PT_MAX_AUTH_FAIL
  MAX_COMMAND_SIZE = TPM2_PT_MAX_COMMAND_SIZE
  MAX_DIGEST = TPM2_PT_MAX_DIGEST
  MAX_OBJECT_CONTEXT = TPM2_PT_MAX_OBJECT_CONTEXT
  MAX_RESPONSE_SIZE = TPM2_PT_MAX_RESPONSE_SIZE
  MAX_SESSION_CONTEXT = TPM2_PT_MAX_SESSION_CONTEXT
  MEMORY = TPM2_PT_MEMORY
  MODES = TPM2_PT_MODES
  NONE = TPM2_PT_NONE
  ORDERLY_COUNT = TPM2_PT_ORDERLY_COUNT
  PERMANENT = TPM2_PT_PERMANENT
  REVISION = TPM2_PT_REVISION
  SPLIT_MAX = TPM2_PT_SPLIT_MAX
  STARTUP_CLEAR = TPM2_PT_STARTUP_CLEAR
  TOTAL_COMMANDS = TPM2_PT_TOTAL_COMMANDS
  VAR = TPM2_PT_VAR
  VENDOR_COMMANDS = TPM2_PT_VENDOR_COMMANDS
  YEAR = TPM2_PT_YEAR
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_PT_AUDIT
  COUNTER_0 = TPM2_PT_AUDIT_COUNTER_0
  COUNTER_1 = TPM2_PT_AUDIT_COUNTER_1
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_PT_CONTEXT
  HASH = TPM2_PT_CONTEXT_HASH
  SYM = TPM2_PT_CONTEXT_SYM
  SYM_SIZE = TPM2_PT_CONTEXT_SYM_SIZE
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_PT_FIRMWARE
  VERSION_1 = TPM2_PT_FIRMWARE_VERSION_1
  VERSION_2 = TPM2_PT_FIRMWARE_VERSION_2
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_PT_HR
  ACTIVE = TPM2_PT_HR_ACTIVE
  ACTIVE_AVAIL = TPM2_PT_HR_ACTIVE_AVAIL
  LOADED = TPM2_PT_HR_LOADED
  LOADED_AVAIL = TPM2_PT_HR_LOADED_AVAIL
  LOADED_MIN = TPM2_PT_HR_LOADED_MIN
  NV_INDEX = TPM2_PT_HR_NV_INDEX
  PERSISTENT = TPM2_PT_HR_PERSISTENT
  PERSISTENT_AVAIL = TPM2_PT_HR_PERSISTENT_AVAIL
  PERSISTENT_MIN = TPM2_PT_HR_PERSISTENT_MIN
  TRANSIENT_AVAIL = TPM2_PT_HR_TRANSIENT_AVAIL
  TRANSIENT_MIN = TPM2_PT_HR_TRANSIENT_MIN
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_PT_NV
  BUFFER_MAX = TPM2_PT_NV_BUFFER_MAX
  COUNTERS = TPM2_PT_NV_COUNTERS
  COUNTERS_AVAIL = TPM2_PT_NV_COUNTERS_AVAIL
  COUNTERS_MAX = TPM2_PT_NV_COUNTERS_MAX
  INDEX_MAX = TPM2_PT_NV_INDEX_MAX
  WRITE_RECOVERY = TPM2_PT_NV_WRITE_RECOVERY
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_PT_PCR
  AUTH = TPM2_PT_PCR_AUTH
  COUNT = TPM2_PT_PCR_COUNT
  DRTM_RESET = TPM2_PT_PCR_DRTM_RESET
  EXTEND_L0 = TPM2_PT_PCR_EXTEND_L0
  EXTEND_L1 = TPM2_PT_PCR_EXTEND_L1
  EXTEND_L2 = TPM2_PT_PCR_EXTEND_L2
  EXTEND_L3 = TPM2_PT_PCR_EXTEND_L3
  EXTEND_L4 = TPM2_PT_PCR_EXTEND_L4
  FIRST = TPM2_PT_TPM2_PCR_FIRST
  LAST = TPM2_PT_TPM2_PCR_LAST
  NO_INCREMENT = TPM2_PT_PCR_NO_INCREMENT
  POLICY = TPM2_PT_PCR_POLICY
  RESET_L0 = TPM2_PT_PCR_RESET_L0
  RESET_L1 = TPM2_PT_PCR_RESET_L1
  RESET_L2 = TPM2_PT_PCR_RESET_L2
  RESET_L3 = TPM2_PT_PCR_RESET_L3
  RESET_L4 = TPM2_PT_PCR_RESET_L4
  SAVE = TPM2_PT_PCR_SAVE
  SELECT_MIN = TPM2_PT_PCR_SELECT_MIN
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_PT_PS
  DAY_OF_YEAR = TPM2_PT_PS_DAY_OF_YEAR
  FAMILY_INDICATOR = TPM2_PT_PS_FAMILY_INDICATOR
  LEVEL = TPM2_PT_PS_LEVEL
  REVISION = TPM2_PT_PS_REVISION
  YEAR = TPM2_PT_PS_YEAR
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_PT_VENDOR
  STRING_1 = TPM2_PT_VENDOR_STRING_1
  STRING_2 = TPM2_PT_VENDOR_STRING_2
  STRING_3 = TPM2_PT_VENDOR_STRING_3
  STRING_4 = TPM2_PT_VENDOR_STRING_4
  TPM_TYPE = TPM2_PT_VENDOR_TPM_TYPE
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_RC
  A = TPM2_RC_A
  ASYMMETRIC = TPM2_RC_ASYMMETRIC
  ATTRIBUTES = TPM2_RC_ATTRIBUTES
  AUTHSIZE = TPM2_RC_AUTHSIZE
  AUTH_CONTEXT = TPM2_RC_AUTH_CONTEXT
  AUTH_FAIL = TPM2_RC_AUTH_FAIL
  AUTH_MISSING = TPM2_RC_AUTH_MISSING
  AUTH_TYPE = TPM2_RC_AUTH_TYPE
  AUTH_UNAVAILABLE = TPM2_RC_AUTH_UNAVAILABLE
  B = TPM2_RC_B
  BAD_AUTH = TPM2_RC_BAD_AUTH
  BAD_CONTEXT = TPM2_RC_BAD_CONTEXT
  BAD_TAG = TPM2_RC_BAD_TAG
  BINDING = TPM2_RC_BINDING
  C = TPM2_RC_C
  CANCELED = TPM2_RC_CANCELED
  COMMAND_CODE = TPM2_RC_COMMAND_CODE
  COMMAND_SIZE = TPM2_RC_COMMAND_SIZE
  CONTEXT_GAP = TPM2_RC_CONTEXT_GAP
  CPHASH = TPM2_RC_CPHASH
  CURVE = TPM2_RC_CURVE
  D = TPM2_RC_D
  DISABLED = TPM2_RC_DISABLED
  E = TPM2_RC_E
  ECC_POINT = TPM2_RC_ECC_POINT
  EXCLUSIVE = TPM2_RC_EXCLUSIVE
  EXPIRED = TPM2_RC_EXPIRED
  F = TPM2_RC_F
  FAILURE = TPM2_RC_FAILURE
  FMT1 = TPM2_RC_FMT1
  H = TPM2_RC_H
  HANDLE = TPM2_RC_HANDLE
  HASH = TPM2_RC_HASH
  HIERARCHY = TPM2_RC_HIERARCHY
  HMAC = TPM2_RC_HMAC
  INITIALIZE = TPM2_RC_INITIALIZE
  INSUFFICIENT = TPM2_RC_INSUFFICIENT
  INTEGRITY = TPM2_RC_INTEGRITY
  KDF = TPM2_RC_KDF
  KEY = TPM2_RC_KEY
  KEY_SIZE = TPM2_RC_KEY_SIZE
  LOCALITY = TPM2_RC_LOCALITY
  LOCKOUT = TPM2_RC_LOCKOUT
  MAX_FM0 = TPM2_RC_MAX_FM0
  MEMORY = TPM2_RC_MEMORY
  MGF = TPM2_RC_MGF
  MODE = TPM2_RC_MODE
  NEEDS_TEST = TPM2_RC_NEEDS_TEST
  NONCE = TPM2_RC_NONCE
  NOT_USED = TPM2_RC_NOT_USED
  NO_RESULT = TPM2_RC_NO_RESULT
  NV_AUTHORIZATION = TPM2_RC_NV_AUTHORIZATION
  NV_DEFINED = TPM2_RC_NV_DEFINED
  NV_LOCKED = TPM2_RC_NV_LOCKED
  NV_RANGE = TPM2_RC_NV_RANGE
  NV_RATE = TPM2_RC_NV_RATE
  NV_SIZE = TPM2_RC_NV_SIZE
  NV_SPACE = TPM2_RC_NV_SPACE
  NV_UNAVAILABLE = TPM2_RC_NV_UNAVAILABLE
  NV_UNINITIALIZED = TPM2_RC_NV_UNINITIALIZED
  N_MASK = TPM2_RC_N_MASK
  OBJECT_HANDLES = TPM2_RC_OBJECT_HANDLES
  OBJECT_MEMORY = TPM2_RC_OBJECT_MEMORY
  P = TPM2_RC_P
  PARENT = TPM2_RC_PARENT
  PCR = TPM2_RC_PCR
  PCR_CHANGED = TPM2_RC_PCR_CHANGED
  POLICY = TPM2_RC_POLICY
  POLICY_CC = TPM2_RC_POLICY_CC
  POLICY_FAIL = TPM2_RC_POLICY_FAIL
  PP = TPM2_RC_PP
  PRIVATE = TPM2_RC_PRIVATE
  RANGE = TPM2_RC_RANGE
  RC1 = TPM2_RC_1
  RC2 = TPM2_RC_2
  RC3 = TPM2_RC_3
  RC4 = TPM2_RC_4
  RC5 = TPM2_RC_5
  RC6 = TPM2_RC_6
  RC7 = TPM2_RC_7
  RC8 = TPM2_RC_8
  RC9 = TPM2_RC_9
  REBOOT = TPM2_RC_REBOOT
  REFERENCE_H0 = TPM2_RC_REFERENCE_H0
  REFERENCE_H1 = TPM2_RC_REFERENCE_H1
  REFERENCE_H2 = TPM2_RC_REFERENCE_H2
  REFERENCE_H3 = TPM2_RC_REFERENCE_H3
  REFERENCE_H4 = TPM2_RC_REFERENCE_H4
  REFERENCE_H5 = TPM2_RC_REFERENCE_H5
  REFERENCE_H6 = TPM2_RC_REFERENCE_H6
  REFERENCE_S0 = TPM2_RC_REFERENCE_S0
  REFERENCE_S1 = TPM2_RC_REFERENCE_S1
  REFERENCE_S2 = TPM2_RC_REFERENCE_S2
  REFERENCE_S3 = TPM2_RC_REFERENCE_S3
  REFERENCE_S4 = TPM2_RC_REFERENCE_S4
  REFERENCE_S5 = TPM2_RC_REFERENCE_S5
  REFERENCE_S6 = TPM2_RC_REFERENCE_S6
  RETRY = TPM2_RC_RETRY
  S = TPM2_RC_S
  SCHEME = TPM2_RC_SCHEME
  SELECTOR = TPM2_RC_SELECTOR
  SENSITIVE = TPM2_RC_SENSITIVE
  SEQUENCE = TPM2_RC_SEQUENCE
  SESSION_HANDLES = TPM2_RC_SESSION_HANDLES
  SESSION_MEMORY = TPM2_RC_SESSION_MEMORY
  SIGNATURE = TPM2_RC_SIGNATURE
  SIZE = TPM2_RC_SIZE
  SUCCESS = TPM2_RC_SUCCESS
  SYMMETRIC = TPM2_RC_SYMMETRIC
  TAG = TPM2_RC_TAG
  TESTING = TPM2_RC_TESTING
  TICKET = TPM2_RC_TICKET
  TOO_MANY_CONTEXTS = TPM2_RC_TOO_MANY_CONTEXTS
  TYPE = TPM2_RC_TYPE
  UNBALANCED = TPM2_RC_UNBALANCED
  UPGRADE = TPM2_RC_UPGRADE
  VALUE = TPM2_RC_VALUE
  VER1 = TPM2_RC_VER1
  WARN = TPM2_RC_WARN
  YIELDED = TPM2_RC_YIELDED
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  decode()
  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_RH
  ADMIN = TPM2_RH_ADMIN
  EK = TPM2_RH_EK
  ENDORSEMENT = TPM2_RH_ENDORSEMENT
  LOCKOUT = TPM2_RH_LOCKOUT
  NULL = TPM2_RH_NULL
  OPERATOR = TPM2_RH_OPERATOR
  OWNER = TPM2_RH_OWNER
  PLATFORM = TPM2_RH_PLATFORM
  PLATFORM_NV = TPM2_RH_PLATFORM_NV
  PW = TPM2_RS_PW
  REVOKE = TPM2_RH_REVOKE
  SRK = TPM2_RH_SRK
  TRANSPORT = TPM2_RH_TRANSPORT
  UNASSIGNED = TPM2_RH_UNASSIGNED
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_SE
  HMAC = TPM2_SE_HMAC
  POLICY = TPM2_SE_POLICY
  TRIAL = TPM2_SE_TRIAL
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_SPEC
  DAY_OF_YEAR = TPM2_SPEC_DAY_OF_YEAR
  FAMILY = TPM2_SPEC_FAMILY
  LEVEL = TPM2_SPEC_LEVEL
  VERSION = TPM2_SPEC_VERSION
  YEAR = TPM2_SPEC_YEAR
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_ST
  ATTEST_CERTIFY = TPM2_ST_ATTEST_CERTIFY
  ATTEST_COMMAND_AUDIT = TPM2_ST_ATTEST_COMMAND_AUDIT
  ATTEST_CREATION = TPM2_ST_ATTEST_CREATION
  ATTEST_NV = TPM2_ST_ATTEST_NV
  ATTEST_QUOTE = TPM2_ST_ATTEST_QUOTE
  ATTEST_SESSION_AUDIT = TPM2_ST_ATTEST_SESSION_AUDIT
  ATTEST_TIME = TPM2_ST_ATTEST_TIME
  AUTH_SECRET = TPM2_ST_AUTH_SECRET
  AUTH_SIGNED = TPM2_ST_AUTH_SIGNED
  CREATION = TPM2_ST_CREATION
  FU_MANIFEST = TPM2_ST_FU_MANIFEST
  HASHCHECK = TPM2_ST_HASHCHECK
  NO_SESSIONS = TPM2_ST_NO_SESSIONS
  NULL = TPM2_ST_NULL
  RSP_COMMAND = TPM2_ST_RSP_COMMAND
  SESSIONS = TPM2_ST_SESSIONS
  VERIFIED = TPM2_ST_VERIFIED
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM2_SU
  CLEAR = TPM2_SU_CLEAR
  STATE = TPM2_SU_STATE
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPMA_ALGORITHM
  ASYMMETRIC = TPMA_ALGORITHM_ASYMMETRIC
  ENCRYPTING = TPMA_ALGORITHM_ENCRYPTING
  HASH = TPMA_ALGORITHM_HASH
  METHOD = TPMA_ALGORITHM_METHOD
  OBJECT = TPMA_ALGORITHM_OBJECT
  RESERVED1_MASK = TPMA_ALGORITHM_RESERVED1_MASK
  SIGNING = TPMA_ALGORITHM_SIGNING
  SYMMETRIC = TPMA_ALGORITHM_SYMMETRIC
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPMA_CC
  CHANDLES_MASK = TPMA_CC_CHANDLES_MASK
  CHANDLES_SHIFT = TPMA_CC_CHANDLES_SHIFT
  COMMANDINDEX_MASK = TPMA_CC_COMMANDINDEX_MASK
  COMMANDINDEX_SHIFT = TPMA_CC_COMMANDINDEX_SHIFT
  EXTENSIVE = TPMA_CC_EXTENSIVE
  FLUSHED = TPMA_CC_FLUSHED
  NV = TPMA_CC_NV
  RESERVED1_MASK = TPMA_CC_RESERVED1_MASK
  RES_MASK = TPMA_CC_RES_MASK
  RES_SHIFT = TPMA_CC_RES_SHIFT
  RHANDLE = TPMA_CC_RHANDLE
  V = TPMA_CC_V
  __str__()

    Given a constant, return the string bitwise representation.

    Each constant is seperated by the “|” (pipe) character.

    Returns:

      a bitwise string value of the fields for the constant normalized to lowercase.

    Return type:

      (str)

    Raises:

      ValueError – If their are unmatched bits in the constant value.

    Example

    str(TPMA_NV(TPMA_NV.PPWRITE|TPMA_NV.ORDERLY|TPMA_NV.NO_DA)) -> ‘ppwrite|noda|orderly’

  property chandles

    The number of handles in the handle area

    Type:

      int

  property commandindex

    The command index

    Type:

      int

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)

    Converts a string of | separated constant values into it’s integer value.

    Given a pipe “|” separated list of string constant values that represent the bitwise values returns the value itself. The value “” (empty string) returns a 0.

    Parameters:

      value (str) – The string “bitwise” expression of the object or the empty string.

    Returns:

      The integer result.

    Raises:

      - TypeError – If the value is not a str.

      - ValueError – If a field portion of the str does not match a constant.

    Examples

    TPMA_NV.parse(“ppwrite|orderly|NO_DA”) -> 0x6000001 TPMA_NV.parse(“NO_DA”) -> 0x2000000

  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPMA_FRIENDLY_INTLIST
  __str__()

    Given a constant, return the string bitwise representation.

    Each constant is seperated by the “|” (pipe) character.

    Returns:

      a bitwise string value of the fields for the constant normalized to lowercase.

    Return type:

      (str)

    Raises:

      ValueError – If their are unmatched bits in the constant value.

    Example

    str(TPMA_NV(TPMA_NV.PPWRITE|TPMA_NV.ORDERLY|TPMA_NV.NO_DA)) -> ‘ppwrite|noda|orderly’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)

    Converts a string of | separated constant values into it’s integer value.

    Given a pipe “|” separated list of string constant values that represent the bitwise values returns the value itself. The value “” (empty string) returns a 0.

    Parameters:

      value (str) – The string “bitwise” expression of the object or the empty string.

    Returns:

      The integer result.

    Raises:

      - TypeError – If the value is not a str.

      - ValueError – If a field portion of the str does not match a constant.

    Examples

    TPMA_NV.parse(“ppwrite|orderly|NO_DA”) -> 0x6000001 TPMA_NV.parse(“NO_DA”) -> 0x2000000

  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPMA_LOCALITY
  EXTENDED_MASK = TPMA_LOCALITY_EXTENDED_MASK
  EXTENDED_SHIFT = TPMA_LOCALITY_EXTENDED_SHIFT
  FOUR = TPMA_LOCALITY_TPM2_LOC_FOUR
  ONE = TPMA_LOCALITY_TPM2_LOC_ONE
  THREE = TPMA_LOCALITY_TPM2_LOC_THREE
  TWO = TPMA_LOCALITY_TPM2_LOC_TWO
  ZERO = TPMA_LOCALITY_TPM2_LOC_ZERO
  __str__()

    Given a set of localities or an extended locality, return the string representation

    Returns:

      a bitwise string value of the localities or the exteded locality.

    Return type:

      (str)

    Example

    str(TPMA_LOCALITY.THREE|TPMA_LOCALITY.FOUR) -> ‘three|four’ str(TPMA_LOCALITY(0xf0)) -> ‘0xf0’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod create_extended(value)
  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)

    Converts a string of | separated localities or an extended locality into a TPMA_LOCALITY instance

    Parameters:

      value (str) – The string “bitwise” expression of the localities or the extended locality.

    Returns:

      The locality or set of localities as a TPMA_LOCALITY instance.

    Raises:

      - TypeError – If the value is not a str.

      - ValueError – If a field portion of the str does not match a constant.

    Examples

    TPMA_LOCALITY.parse(“zero|one”) -> 0x03 TPMA_LOCALITY.parse(“0xf0”) -> 0xf0

  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPMA_MEMORY
  OBJECTCOPIEDTORAM = TPMA_MEMORY_OBJECTCOPIEDTORAM
  SHAREDNV = TPMA_MEMORY_SHAREDNV
  SHAREDRAM = TPMA_MEMORY_SHAREDRAM
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPMA_MODES
  FIPS_140_2 = TPMA_MODES_FIPS_140_2
  RESERVED1_MASK = TPMA_MODES_RESERVED1_MASK
  __str__()

    Given a constant, return the string bitwise representation.

    Each constant is seperated by the “|” (pipe) character.

    Returns:

      a bitwise string value of the fields for the constant normalized to lowercase.

    Return type:

      (str)

    Raises:

      ValueError – If their are unmatched bits in the constant value.

    Example

    str(TPMA_NV(TPMA_NV.PPWRITE|TPMA_NV.ORDERLY|TPMA_NV.NO_DA)) -> ‘ppwrite|noda|orderly’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)

    Converts a string of | separated constant values into it’s integer value.

    Given a pipe “|” separated list of string constant values that represent the bitwise values returns the value itself. The value “” (empty string) returns a 0.

    Parameters:

      value (str) – The string “bitwise” expression of the object or the empty string.

    Returns:

      The integer result.

    Raises:

      - TypeError – If the value is not a str.

      - ValueError – If a field portion of the str does not match a constant.

    Examples

    TPMA_NV.parse(“ppwrite|orderly|NO_DA”) -> 0x6000001 TPMA_NV.parse(“NO_DA”) -> 0x2000000

  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPMA_NV
  AUTHREAD = TPMA_NV_AUTHREAD
  AUTHWRITE = TPMA_NV_AUTHWRITE
  CLEAR_STCLEAR = TPMA_NV_CLEAR_STCLEAR
  GLOBALLOCK = TPMA_NV_GLOBALLOCK
  NO_DA = TPMA_NV_NO_DA
  ORDERLY = TPMA_NV_ORDERLY
  OWNERREAD = TPMA_NV_OWNERREAD
  OWNERWRITE = TPMA_NV_OWNERWRITE
  PLATFORMCREATE = TPMA_NV_PLATFORMCREATE
  POLICYREAD = TPMA_NV_POLICYREAD
  POLICYWRITE = TPMA_NV_POLICYWRITE
  POLICY_DELETE = TPMA_NV_POLICY_DELETE
  PPREAD = TPMA_NV_PPREAD
  PPWRITE = TPMA_NV_PPWRITE
  READLOCKED = TPMA_NV_READLOCKED
  READ_STCLEAR = TPMA_NV_READ_STCLEAR
  TPM2_NT_MASK = TPMA_NV_TPM2_NT_MASK
  TPM2_NT_SHIFT = TPMA_NV_TPM2_NT_SHIFT
  WRITEALL = TPMA_NV_WRITEALL
  WRITEDEFINE = TPMA_NV_WRITEDEFINE
  WRITELOCKED = TPMA_NV_WRITELOCKED
  WRITE_STCLEAR = TPMA_NV_WRITE_STCLEAR
  WRITTEN = TPMA_NV_WRITTEN
  __str__()

    Given a constant, return the string bitwise representation.

    Each constant is seperated by the “|” (pipe) character.

    Returns:

      a bitwise string value of the fields for the constant normalized to lowercase.

    Return type:

      (str)

    Raises:

      ValueError – If their are unmatched bits in the constant value.

    Example

    str(TPMA_NV(TPMA_NV.PPWRITE|TPMA_NV.ORDERLY|TPMA_NV.NO_DA)) -> ‘ppwrite|noda|orderly’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  property nt

    The type of the NV area

    Type:

      TPM2_NT

  classmethod parse(value)

    Converts a string of | separated constant values into it’s integer value.

    Given a pipe “|” separated list of string constant values that represent the bitwise values returns the value itself. The value “” (empty string) returns a 0.

    Parameters:

      value (str) – The string “bitwise” expression of the object or the empty string.

    Returns:

      The integer result.

    Raises:

      - TypeError – If the value is not a str.

      - ValueError – If a field portion of the str does not match a constant.

    Examples

    TPMA_NV.parse(“ppwrite|orderly|NO_DA”) -> 0x6000001 TPMA_NV.parse(“NO_DA”) -> 0x2000000

  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPMA_OBJECT
  ADMINWITHPOLICY = TPMA_OBJECT_ADMINWITHPOLICY
  DECRYPT = TPMA_OBJECT_DECRYPT
  DEFAULT_TPM2_TOOLS_CREATEPRIMARY_ATTRS = TPMA_OBJECT_RESTRICTED.__or__().__or__().__or__().__or__().__or__()
  DEFAULT_TPM2_TOOLS_CREATE_ATTRS = TPMA_OBJECT_DECRYPT.__or__().__or__().__or__().__or__().__or__()
  ENCRYPTEDDUPLICATION = TPMA_OBJECT_ENCRYPTEDDUPLICATION
  FIXEDPARENT = TPMA_OBJECT_FIXEDPARENT
  FIXEDTPM = TPMA_OBJECT_FIXEDTPM
  NODA = TPMA_OBJECT_NODA
  RESTRICTED = TPMA_OBJECT_RESTRICTED
  SENSITIVEDATAORIGIN = TPMA_OBJECT_SENSITIVEDATAORIGIN
  SIGN_ENCRYPT = TPMA_OBJECT_SIGN_ENCRYPT
  STCLEAR = TPMA_OBJECT_STCLEAR
  USERWITHAUTH = TPMA_OBJECT_USERWITHAUTH
  __str__()

    Given a constant, return the string bitwise representation.

    Each constant is seperated by the “|” (pipe) character.

    Returns:

      a bitwise string value of the fields for the constant normalized to lowercase.

    Return type:

      (str)

    Raises:

      ValueError – If their are unmatched bits in the constant value.

    Example

    str(TPMA_NV(TPMA_NV.PPWRITE|TPMA_NV.ORDERLY|TPMA_NV.NO_DA)) -> ‘ppwrite|noda|orderly’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)

    Converts a string of | separated constant values into it’s integer value.

    Given a pipe “|” separated list of string constant values that represent the bitwise values returns the value itself. The value “” (empty string) returns a 0.

    Parameters:

      value (str) – The string “bitwise” expression of the object or the empty string.

    Returns:

      The integer result.

    Raises:

      - TypeError – If the value is not a str.

      - ValueError – If a field portion of the str does not match a constant.

    Examples

    TPMA_NV.parse(“ppwrite|orderly|NO_DA”) -> 0x6000001 TPMA_NV.parse(“NO_DA”) -> 0x2000000

  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPMA_PERMANENT
  DISABLECLEAR = TPMA_PERMANENT_DISABLECLEAR
  ENDORSEMENTAUTHSET = TPMA_PERMANENT_ENDORSEMENTAUTHSET
  INLOCKOUT = TPMA_PERMANENT_INLOCKOUT
  LOCKOUTAUTHSET = TPMA_PERMANENT_LOCKOUTAUTHSET
  OWNERAUTHSET = TPMA_PERMANENT_OWNERAUTHSET
  RESERVED1_MASK = TPMA_PERMANENT_RESERVED1_MASK
  RESERVED2_MASK = TPMA_PERMANENT_RESERVED2_MASK
  TPMGENERATEDEPS = TPMA_PERMANENT_TPMGENERATEDEPS
  __str__()

    Given a constant, return the string bitwise representation.

    Each constant is seperated by the “|” (pipe) character.

    Returns:

      a bitwise string value of the fields for the constant normalized to lowercase.

    Return type:

      (str)

    Raises:

      ValueError – If their are unmatched bits in the constant value.

    Example

    str(TPMA_NV(TPMA_NV.PPWRITE|TPMA_NV.ORDERLY|TPMA_NV.NO_DA)) -> ‘ppwrite|noda|orderly’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)

    Converts a string of | separated constant values into it’s integer value.

    Given a pipe “|” separated list of string constant values that represent the bitwise values returns the value itself. The value “” (empty string) returns a 0.

    Parameters:

      value (str) – The string “bitwise” expression of the object or the empty string.

    Returns:

      The integer result.

    Raises:

      - TypeError – If the value is not a str.

      - ValueError – If a field portion of the str does not match a constant.

    Examples

    TPMA_NV.parse(“ppwrite|orderly|NO_DA”) -> 0x6000001 TPMA_NV.parse(“NO_DA”) -> 0x2000000

  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPMA_SESSION
  AUDIT = TPMA_SESSION_AUDIT
  AUDITEXCLUSIVE = TPMA_SESSION_AUDITEXCLUSIVE
  AUDITRESET = TPMA_SESSION_AUDITRESET
  CONTINUESESSION = TPMA_SESSION_CONTINUESESSION
  DECRYPT = TPMA_SESSION_DECRYPT
  ENCRYPT = TPMA_SESSION_ENCRYPT
  __str__()

    Given a constant, return the string bitwise representation.

    Each constant is seperated by the “|” (pipe) character.

    Returns:

      a bitwise string value of the fields for the constant normalized to lowercase.

    Return type:

      (str)

    Raises:

      ValueError – If their are unmatched bits in the constant value.

    Example

    str(TPMA_NV(TPMA_NV.PPWRITE|TPMA_NV.ORDERLY|TPMA_NV.NO_DA)) -> ‘ppwrite|noda|orderly’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)

    Converts a string of | separated constant values into it’s integer value.

    Given a pipe “|” separated list of string constant values that represent the bitwise values returns the value itself. The value “” (empty string) returns a 0.

    Parameters:

      value (str) – The string “bitwise” expression of the object or the empty string.

    Returns:

      The integer result.

    Raises:

      - TypeError – If the value is not a str.

      - ValueError – If a field portion of the str does not match a constant.

    Examples

    TPMA_NV.parse(“ppwrite|orderly|NO_DA”) -> 0x6000001 TPMA_NV.parse(“NO_DA”) -> 0x2000000

  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPMA_STARTUP
  CLEAR_EHENABLE = TPMA_STARTUP_CLEAR_EHENABLE
  CLEAR_ORDERLY = TPMA_STARTUP_CLEAR_ORDERLY
  CLEAR_PHENABLE = TPMA_STARTUP_CLEAR_PHENABLE
  CLEAR_PHENABLENV = TPMA_STARTUP_CLEAR_PHENABLENV
  CLEAR_RESERVED1_MASK = TPMA_STARTUP_CLEAR_RESERVED1_MASK
  CLEAR_SHENABLE = TPMA_STARTUP_CLEAR_SHENABLE
  __str__()

    Given a constant, return the string bitwise representation.

    Each constant is seperated by the “|” (pipe) character.

    Returns:

      a bitwise string value of the fields for the constant normalized to lowercase.

    Return type:

      (str)

    Raises:

      ValueError – If their are unmatched bits in the constant value.

    Example

    str(TPMA_NV(TPMA_NV.PPWRITE|TPMA_NV.ORDERLY|TPMA_NV.NO_DA)) -> ‘ppwrite|noda|orderly’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)

    Converts a string of | separated constant values into it’s integer value.

    Given a pipe “|” separated list of string constant values that represent the bitwise values returns the value itself. The value “” (empty string) returns a 0.

    Parameters:

      value (str) – The string “bitwise” expression of the object or the empty string.

    Returns:

      The integer result.

    Raises:

      - TypeError – If the value is not a str.

      - ValueError – If a field portion of the str does not match a constant.

    Examples

    TPMA_NV.parse(“ppwrite|orderly|NO_DA”) -> 0x6000001 TPMA_NV.parse(“NO_DA”) -> 0x2000000

  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPMI_YES_NO
  NO = TPM2_NO
  YES = TPM2_YES
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM_AT
  ANY = TPM_AT_ANY
  ERROR = TPM_AT_ERROR
  PV1 = TPM_AT_PV1
  VEND = TPM_AT_VEND
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM_BASE_RC
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  decode()
  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TPM_FRIENDLY_INT
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TSS2_POLICY_PCR_SELECTOR
  PCR_SELECT = 0
  PCR_SELECTION = 1
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.

class tpm2_pytss.constants.TSS2_RC
  BASE_RC_ABI_MISMATCH = TSS2_BASE_RC_ABI_MISMATCH
  BASE_RC_AUTHORIZATION_FAILED = TSS2_BASE_RC_AUTHORIZATION_FAILED
  BASE_RC_AUTHORIZATION_UNKNOWN = TSS2_BASE_RC_AUTHORIZATION_UNKNOWN
  BASE_RC_BAD_CONTEXT = TSS2_BASE_RC_BAD_CONTEXT
  BASE_RC_BAD_KEY = TSS2_BASE_RC_BAD_KEY
  BASE_RC_BAD_PATH = TSS2_BASE_RC_BAD_PATH
  BASE_RC_BAD_REFERENCE = TSS2_BASE_RC_BAD_REFERENCE
  BASE_RC_BAD_SEQUENCE = TSS2_BASE_RC_BAD_SEQUENCE
  BASE_RC_BAD_SIZE = TSS2_BASE_RC_BAD_SIZE
  BASE_RC_BAD_TCTI_STRUCTURE = TSS2_BASE_RC_BAD_TCTI_STRUCTURE
  BASE_RC_BAD_TEMPLATE = TSS2_BASE_RC_BAD_TEMPLATE
  BASE_RC_BAD_TR = TSS2_BASE_RC_BAD_TR
  BASE_RC_BAD_VALUE = TSS2_BASE_RC_BAD_VALUE
  BASE_RC_GENERAL_FAILURE = TSS2_BASE_RC_GENERAL_FAILURE
  BASE_RC_HASH_MISMATCH = TSS2_BASE_RC_HASH_MISMATCH
  BASE_RC_INCOMPATIBLE_TCTI = TSS2_BASE_RC_INCOMPATIBLE_TCTI
  BASE_RC_INSUFFICIENT_BUFFER = TSS2_BASE_RC_INSUFFICIENT_BUFFER
  BASE_RC_INSUFFICIENT_CONTEXT = TSS2_BASE_RC_INSUFFICIENT_CONTEXT
  BASE_RC_INSUFFICIENT_RESPONSE = TSS2_BASE_RC_INSUFFICIENT_RESPONSE
  BASE_RC_INVALID_SESSIONS = TSS2_BASE_RC_INVALID_SESSIONS
  BASE_RC_IO_ERROR = TSS2_BASE_RC_IO_ERROR
  BASE_RC_KEY_NOT_DUPLICABLE = TSS2_BASE_RC_KEY_NOT_DUPLICABLE
  BASE_RC_KEY_NOT_FOUND = TSS2_BASE_RC_KEY_NOT_FOUND
  BASE_RC_MALFORMED_RESPONSE = TSS2_BASE_RC_MALFORMED_RESPONSE
  BASE_RC_MEMORY = TSS2_BASE_RC_MEMORY
  BASE_RC_MULTIPLE_DECRYPT_SESSIONS = TSS2_BASE_RC_MULTIPLE_DECRYPT_SESSIONS
  BASE_RC_MULTIPLE_ENCRYPT_SESSIONS = TSS2_BASE_RC_MULTIPLE_ENCRYPT_SESSIONS
  BASE_RC_NAME_ALREADY_EXISTS = TSS2_BASE_RC_NAME_ALREADY_EXISTS
  BASE_RC_NOT_DELETABLE = TSS2_BASE_RC_NOT_DELETABLE
  BASE_RC_NOT_IMPLEMENTED = TSS2_BASE_RC_NOT_IMPLEMENTED
  BASE_RC_NOT_PERMITTED = TSS2_BASE_RC_NOT_PERMITTED
  BASE_RC_NOT_SUPPORTED = TSS2_BASE_RC_NOT_SUPPORTED
  BASE_RC_NO_CERT = TSS2_BASE_RC_NO_CERT
  BASE_RC_NO_CONFIG = TSS2_BASE_RC_NO_CONFIG
  BASE_RC_NO_CONNECTION = TSS2_BASE_RC_NO_CONNECTION
  BASE_RC_NO_DECRYPT_PARAM = TSS2_BASE_RC_NO_DECRYPT_PARAM
  BASE_RC_NO_ENCRYPT_PARAM = TSS2_BASE_RC_NO_ENCRYPT_PARAM
  BASE_RC_NO_HANDLE = TSS2_BASE_RC_NO_HANDLE
  BASE_RC_NO_PCR = TSS2_BASE_RC_NO_PCR
  BASE_RC_NO_TPM = TSS2_BASE_RC_NO_TPM
  BASE_RC_NV_NOT_READABLE = TSS2_BASE_RC_NV_NOT_READABLE
  BASE_RC_NV_NOT_WRITEABLE = TSS2_BASE_RC_NV_NOT_WRITEABLE
  BASE_RC_NV_TOO_SMALL = TSS2_BASE_RC_NV_TOO_SMALL
  BASE_RC_NV_WRONG_TYPE = TSS2_BASE_RC_NV_WRONG_TYPE
  BASE_RC_PATH_ALREADY_EXISTS = TSS2_BASE_RC_PATH_ALREADY_EXISTS
  BASE_RC_PATH_NOT_FOUND = TSS2_BASE_RC_PATH_NOT_FOUND
  BASE_RC_PCR_NOT_RESETTABLE = TSS2_BASE_RC_PCR_NOT_RESETTABLE
  BASE_RC_POLICY_UNKNOWN = TSS2_BASE_RC_POLICY_UNKNOWN
  BASE_RC_RSP_AUTH_FAILED = TSS2_BASE_RC_RSP_AUTH_FAILED
  BASE_RC_SIGNATURE_VERIFICATION_FAILED = TSS2_BASE_RC_SIGNATURE_VERIFICATION_FAILED
  BASE_RC_TRY_AGAIN = TSS2_BASE_RC_TRY_AGAIN
  ESAPI_RC_LAYER = TSS2_ESAPI_RC_LAYER
  ESYS_RC_ABI_MISMATCH = TSS2_ESYS_RC_ABI_MISMATCH
  ESYS_RC_BAD_REFERENCE = TSS2_ESYS_RC_BAD_REFERENCE
  ESYS_RC_BAD_SEQUENCE = TSS2_ESYS_RC_BAD_SEQUENCE
  ESYS_RC_BAD_SIZE = TSS2_ESYS_RC_BAD_SIZE
  ESYS_RC_BAD_TCTI_STRUCTURE = TSS2_ESYS_RC_BAD_TCTI_STRUCTURE
  ESYS_RC_BAD_TR = TSS2_ESYS_RC_BAD_TR
  ESYS_RC_BAD_VALUE = TSS2_ESYS_RC_BAD_VALUE
  ESYS_RC_GENERAL_FAILURE = TSS2_ESYS_RC_GENERAL_FAILURE
  ESYS_RC_INCOMPATIBLE_TCTI = TSS2_ESYS_RC_INCOMPATIBLE_TCTI
  ESYS_RC_INSUFFICIENT_BUFFER = TSS2_ESYS_RC_INSUFFICIENT_BUFFER
  ESYS_RC_INSUFFICIENT_CONTEXT = TSS2_ESYS_RC_INSUFFICIENT_CONTEXT
  ESYS_RC_INSUFFICIENT_RESPONSE = TSS2_ESYS_RC_INSUFFICIENT_RESPONSE
  ESYS_RC_INVALID_SESSIONS = TSS2_ESYS_RC_INVALID_SESSIONS
  ESYS_RC_IO_ERROR = TSS2_ESYS_RC_IO_ERROR
  ESYS_RC_MALFORMED_RESPONSE = TSS2_ESYS_RC_MALFORMED_RESPONSE
  ESYS_RC_MEMORY = TSS2_ESYS_RC_MEMORY
  ESYS_RC_MULTIPLE_DECRYPT_SESSIONS = TSS2_ESYS_RC_MULTIPLE_DECRYPT_SESSIONS
  ESYS_RC_MULTIPLE_ENCRYPT_SESSIONS = TSS2_ESYS_RC_MULTIPLE_ENCRYPT_SESSIONS
  ESYS_RC_NOT_IMPLEMENTED = TSS2_ESYS_RC_NOT_IMPLEMENTED
  ESYS_RC_NO_DECRYPT_PARAM = TSS2_ESYS_RC_NO_DECRYPT_PARAM
  ESYS_RC_NO_ENCRYPT_PARAM = TSS2_ESYS_RC_NO_ENCRYPT_PARAM
  ESYS_RC_RSP_AUTH_FAILED = TSS2_ESYS_RC_RSP_AUTH_FAILED
  ESYS_RC_TRY_AGAIN = TSS2_ESYS_RC_TRY_AGAIN
  FEATURE_RC_LAYER = TSS2_FEATURE_RC_LAYER
  LAYER_IMPLEMENTATION_SPECIFIC_OFFSET = TSS2_LAYER_IMPLEMENTATION_SPECIFIC_OFFSET
  LEVEL_IMPLEMENTATION_SPECIFIC_SHIFT = TSS2_LEVEL_IMPLEMENTATION_SPECIFIC_SHIFT
  MU_RC_BAD_REFERENCE = TSS2_MU_RC_BAD_REFERENCE
  MU_RC_BAD_SIZE = TSS2_MU_RC_BAD_SIZE
  MU_RC_BAD_VALUE = TSS2_MU_RC_BAD_VALUE
  MU_RC_GENERAL_FAILURE = TSS2_MU_RC_GENERAL_FAILURE
  MU_RC_INSUFFICIENT_BUFFER = TSS2_MU_RC_INSUFFICIENT_BUFFER
  MU_RC_LAYER = TSS2_MU_RC_LAYER
  RC_LAYER_MASK = TSS2_RC_LAYER_MASK
  RC_LAYER_SHIFT = TSS2_RC_LAYER_SHIFT
  RC_SUCCESS = TSS2_RC_SUCCESS
  RESMGR_RC_LAYER = TSS2_RESMGR_RC_LAYER
  RESMGR_TPM_RC_LAYER = TSS2_RESMGR_TPM_RC_LAYER
  SYS_RC_ABI_MISMATCH = TSS2_SYS_RC_ABI_MISMATCH
  SYS_RC_BAD_REFERENCE = TSS2_SYS_RC_BAD_REFERENCE
  SYS_RC_BAD_SEQUENCE = TSS2_SYS_RC_BAD_SEQUENCE
  SYS_RC_BAD_SIZE = TSS2_SYS_RC_BAD_SIZE
  SYS_RC_BAD_TCTI_STRUCTURE = TSS2_SYS_RC_BAD_TCTI_STRUCTURE
  SYS_RC_BAD_VALUE = TSS2_SYS_RC_BAD_VALUE
  SYS_RC_GENERAL_FAILURE = TSS2_SYS_RC_GENERAL_FAILURE
  SYS_RC_INCOMPATIBLE_TCTI = TSS2_SYS_RC_INCOMPATIBLE_TCTI
  SYS_RC_INSUFFICIENT_BUFFER = TSS2_SYS_RC_INSUFFICIENT_BUFFER
  SYS_RC_INSUFFICIENT_CONTEXT = TSS2_SYS_RC_INSUFFICIENT_CONTEXT
  SYS_RC_INSUFFICIENT_RESPONSE = TSS2_SYS_RC_INSUFFICIENT_RESPONSE
  SYS_RC_INVALID_SESSIONS = TSS2_SYS_RC_INVALID_SESSIONS
  SYS_RC_LAYER = TSS2_SYS_RC_LAYER
  SYS_RC_MALFORMED_RESPONSE = TSS2_SYS_RC_MALFORMED_RESPONSE
  SYS_RC_NO_DECRYPT_PARAM = TSS2_SYS_RC_NO_DECRYPT_PARAM
  SYS_RC_NO_ENCRYPT_PARAM = TSS2_SYS_RC_NO_ENCRYPT_PARAM
  TCTI_RC_ABI_MISMATCH = TSS2_TCTI_RC_ABI_MISMATCH
  TCTI_RC_BAD_CONTEXT = TSS2_TCTI_RC_BAD_CONTEXT
  TCTI_RC_BAD_REFERENCE = TSS2_TCTI_RC_BAD_REFERENCE
  TCTI_RC_BAD_SEQUENCE = TSS2_TCTI_RC_BAD_SEQUENCE
  TCTI_RC_BAD_VALUE = TSS2_TCTI_RC_BAD_VALUE
  TCTI_RC_GENERAL_FAILURE = TSS2_TCTI_RC_GENERAL_FAILURE
  TCTI_RC_INSUFFICIENT_BUFFER = TSS2_TCTI_RC_INSUFFICIENT_BUFFER
  TCTI_RC_IO_ERROR = TSS2_TCTI_RC_IO_ERROR
  TCTI_RC_LAYER = TSS2_TCTI_RC_LAYER
  TCTI_RC_MALFORMED_RESPONSE = TSS2_TCTI_RC_MALFORMED_RESPONSE
  TCTI_RC_MEMORY = TSS2_TCTI_RC_MEMORY
  TCTI_RC_NOT_IMPLEMENTED = TSS2_TCTI_RC_NOT_IMPLEMENTED
  TCTI_RC_NOT_PERMITTED = TSS2_TCTI_RC_NOT_PERMITTED
  TCTI_RC_NOT_SUPPORTED = TSS2_TCTI_RC_NOT_SUPPORTED
  TCTI_RC_NO_CONNECTION = TSS2_TCTI_RC_NO_CONNECTION
  TCTI_RC_TRY_AGAIN = TSS2_TCTI_RC_TRY_AGAIN
  TPM_RC_LAYER = TSS2_TPM_RC_LAYER
  __str__()

    Returns a string value of the constant normalized to lowercase.

    Returns:

      a string value of the constant normalized to lowercase.

    Return type:

      (str)

    Example

    str(ESYS_TR.PCR2) -> ‘pcr2’

  classmethod contains(value)

    Indicates if a class contains a numeric constant.

    Parameters:

      value (int) – The raw numerical number to test for.

    Returns:

      True if the class contains the constant, False otherwise.

    Return type:

      (bool)

    Example

    ESYS_TR.contains(7) -> True

  decode()
  classmethod iterator()

    Returns the constants in the class.

    Returns:

      The int values of the constants in the class.

    Return type:

      (int)

    Example

    list(ESYS_TR.iterator()) -> [4095, 255, 0, 1, 2, 3, … ]

  marshal()

    Marshal instance into bytes.

    Returns:

      Returns the marshaled type as bytes.

  classmethod parse(value)
  classmethod to_string(value)

    Converts an integer value into it’s friendly string name for that class.

    Parameters:

      value (int) – The raw numerical number to try and convert to a name.

    Returns:

      The string of the constant defining the raw numeric.

    Return type:

      (str)

    Raises:

      ValueError – If the numeric does not match a constant.

    Example

    ESYS_TR.to_string(5) -> ‘ESYS_TR.PCR5’

  classmethod unmarshal(buf)

    Unmarshal bytes into type instance.

    Parameters:

      buf (bytes) – The bytes to be unmarshaled.

    Returns:

      Returns an instance of the current type and the number of bytes consumed.