C# Class Tpm2Lib.TpmHandle

Inheritance: TpmStructureBase, INameUnion
Afficher le fichier Open project: Microsoft/TSS.MSR Class Usage Examples

Private Properties

Свойство Type Description
IsNull bool
IsSession bool
TpmHandle System

Méthodes publiques

Méthode Description
Copy ( ) : TpmHandle
Equals ( Object obj ) : bool
GetFirst ( Ht rangeType ) : uint

Get uint value representing the first handle in the range dedicated to the handles of the given type.

GetHashCode ( ) : int
GetIndex ( ) : uint
GetName ( ) : byte[]

Get the TPM name of the associated entity. If the entity is a transient object, persistent object or NV index, the name must have been previously set explicitly by the caller (by means of SetName() or GetName(Tpm2 tpm) methods) or implicitly by the framework (when an object is created by means of CreatePrimary, CreateLoaded or Create command). Otherwise the name is a 4-byte TPM representation of the handle value.

GetName ( Tpm2 tpm ) : byte[]

Returns the cached name of an entity referenced by this handle. If the name is not cached yet, retrieves it from the TPM (for a transient or persistent object, or NV index) or computes it (for session, PCR or permanent handles).

GetOffset ( ) : uint

return the handle minus the handle-type (top byte) field

GetQualifiedName ( TpmHandle hierarchyHandle, TpmPublic children ) : byte[]

Calculate the qualified name of an object presumed loaded under the provided ancestral chain in a given hierarchy.

GetRangeLength ( Ht rangeType ) : uint

Get the length (number of handles) in the range dedicated to the handles of the given type.

GetType ( ) : Ht
GetUnionSelector ( ) : NameUnionTagValues
HmacSession ( uint handleIndex ) : TpmHandle

Create a HMAC handle given an index into the HMAC handle range

NV ( int slotIndex ) : TpmHandle

Return a handle to the the specified NV index

NV ( uint slotIndex ) : TpmHandle

Return a handle to the the specified NV index

Pcr ( int pcrIndex ) : TpmHandle
Pcr ( uint pcrIndex ) : TpmHandle

Return a handle for the PCR of specified index

Persistent ( uint handleIndex ) : TpmHandle

Create a persistent handle given an index into the persistent handle range

SetAuth ( AuthValue auth ) : TpmHandle

Associates authorization value with the handle. This association is done automatically by TPM commands producing the corresponding handle or changing object's auth value. However on many occasions the library does not have access to the auth value at any moment before it is required for authorizing access to the handle. Notably, when an externally created key is imported, pre-existing NV index or persistent object is used, SetAuth() is required to associate auth value with the handle.

SetName ( byte name ) : TpmHandle

Associates the name with the handle. Only needed for transient, persistent and NV handles. Normally this association is done automatically either by TPM commands producing the corresponding handle, or when the handle is passed as a parameter to a command requiring HMAC authorization (the name is implicitly requested from the TPM by means of TPM2_ReadPublic or TPM2_NV_ReadPublic commands). Thus this method has to be used only either when Tpm2 object is in the strict mode (i.e. it is prohibited to issue commands not explicitly requested by the user), or for the sake of performance optimization (if the client code has the name pre-computed).

TpmHandle ( ) : System
TpmHandle ( Ht handleType, uint offset ) : System

Create a handle of the given type with the given numerical value.

TpmHandle ( TpmHandle the_TpmHandle ) : System
TpmHandle ( TpmRh reservedHandle ) : System

Create a reserved TPM handle.

TpmHandle ( uint the_handle ) : System
operator ( ) : ParametrizedHandle
operator ( ) : bool

Returns true if the two arguments either are both null references or encapsulate the same TPM handle.

Private Methods

Méthode Description
IsNull ( TpmHandle h ) : bool
IsSession ( ) : bool
TpmHandle ( TpmHandle src, Bind bind ) : System

Method Details

Copy() public méthode

public Copy ( ) : TpmHandle
Résultat TpmHandle

Equals() public méthode

public Equals ( Object obj ) : bool
obj Object
Résultat bool

GetFirst() public static méthode

Get uint value representing the first handle in the range dedicated to the handles of the given type.
public static GetFirst ( Ht rangeType ) : uint
rangeType Ht
Résultat uint

GetHashCode() public méthode

public GetHashCode ( ) : int
Résultat int

GetIndex() public méthode

public GetIndex ( ) : uint
Résultat uint

GetName() public méthode

Get the TPM name of the associated entity. If the entity is a transient object, persistent object or NV index, the name must have been previously set explicitly by the caller (by means of SetName() or GetName(Tpm2 tpm) methods) or implicitly by the framework (when an object is created by means of CreatePrimary, CreateLoaded or Create command). Otherwise the name is a 4-byte TPM representation of the handle value.
public GetName ( ) : byte[]
Résultat byte[]

GetName() public méthode

Returns the cached name of an entity referenced by this handle. If the name is not cached yet, retrieves it from the TPM (for a transient or persistent object, or NV index) or computes it (for session, PCR or permanent handles).
public GetName ( Tpm2 tpm ) : byte[]
tpm Tpm2
Résultat byte[]

GetOffset() public méthode

return the handle minus the handle-type (top byte) field
public GetOffset ( ) : uint
Résultat uint

GetQualifiedName() public static méthode

Calculate the qualified name of an object presumed loaded under the provided ancestral chain in a given hierarchy.
public static GetQualifiedName ( TpmHandle hierarchyHandle, TpmPublic children ) : byte[]
hierarchyHandle TpmHandle
children TpmPublic
Résultat byte[]

GetRangeLength() public static méthode

Get the length (number of handles) in the range dedicated to the handles of the given type.
public static GetRangeLength ( Ht rangeType ) : uint
rangeType Ht
Résultat uint

GetType() public méthode

public GetType ( ) : Ht
Résultat Ht

GetUnionSelector() public méthode

public GetUnionSelector ( ) : NameUnionTagValues
Résultat NameUnionTagValues

HmacSession() public static méthode

Create a HMAC handle given an index into the HMAC handle range
public static HmacSession ( uint handleIndex ) : TpmHandle
handleIndex uint
Résultat TpmHandle

NV() public static méthode

Return a handle to the the specified NV index
public static NV ( int slotIndex ) : TpmHandle
slotIndex int
Résultat TpmHandle

NV() public static méthode

Return a handle to the the specified NV index
public static NV ( uint slotIndex ) : TpmHandle
slotIndex uint
Résultat TpmHandle

Pcr() public static méthode

public static Pcr ( int pcrIndex ) : TpmHandle
pcrIndex int
Résultat TpmHandle

Pcr() public static méthode

Return a handle for the PCR of specified index
public static Pcr ( uint pcrIndex ) : TpmHandle
pcrIndex uint
Résultat TpmHandle

Persistent() public static méthode

Create a persistent handle given an index into the persistent handle range
public static Persistent ( uint handleIndex ) : TpmHandle
handleIndex uint
Résultat TpmHandle

SetAuth() public méthode

Associates authorization value with the handle. This association is done automatically by TPM commands producing the corresponding handle or changing object's auth value. However on many occasions the library does not have access to the auth value at any moment before it is required for authorizing access to the handle. Notably, when an externally created key is imported, pre-existing NV index or persistent object is used, SetAuth() is required to associate auth value with the handle.
public SetAuth ( AuthValue auth ) : TpmHandle
auth AuthValue
Résultat TpmHandle

SetName() public méthode

Associates the name with the handle. Only needed for transient, persistent and NV handles. Normally this association is done automatically either by TPM commands producing the corresponding handle, or when the handle is passed as a parameter to a command requiring HMAC authorization (the name is implicitly requested from the TPM by means of TPM2_ReadPublic or TPM2_NV_ReadPublic commands). Thus this method has to be used only either when Tpm2 object is in the strict mode (i.e. it is prohibited to issue commands not explicitly requested by the user), or for the sake of performance optimization (if the client code has the name pre-computed).
public SetName ( byte name ) : TpmHandle
name byte
Résultat TpmHandle

TpmHandle() public méthode

public TpmHandle ( ) : System
Résultat System

TpmHandle() public méthode

Create a handle of the given type with the given numerical value.
public TpmHandle ( Ht handleType, uint offset ) : System
handleType Ht
offset uint
Résultat System

TpmHandle() public méthode

public TpmHandle ( TpmHandle the_TpmHandle ) : System
the_TpmHandle TpmHandle
Résultat System

TpmHandle() public méthode

Create a reserved TPM handle.
public TpmHandle ( TpmRh reservedHandle ) : System
reservedHandle TpmRh
Résultat System

TpmHandle() public méthode

public TpmHandle ( uint the_handle ) : System
the_handle uint Handle value
Résultat System

operator() public static méthode

public static operator ( ) : ParametrizedHandle
Résultat ParametrizedHandle

operator() public static méthode

Returns true if the two arguments either are both null references or encapsulate the same TPM handle.
public static operator ( ) : bool
Résultat bool