C# Класс Tpm2Lib.TpmHandle

Наследование: TpmStructureBase, INameUnion
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
IsNull bool
IsSession bool
TpmHandle System

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
IsNull ( TpmHandle h ) : bool
IsSession ( ) : bool
TpmHandle ( TpmHandle src, Bind bind ) : System

Описание методов

Copy() публичный Метод

public Copy ( ) : TpmHandle
Результат TpmHandle

Equals() публичный Метод

public Equals ( Object obj ) : bool
obj Object
Результат bool

GetFirst() публичный статический Метод

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
Результат uint

GetHashCode() публичный Метод

public GetHashCode ( ) : int
Результат int

GetIndex() публичный Метод

public GetIndex ( ) : uint
Результат uint

GetName() публичный Метод

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[]
Результат byte[]

GetName() публичный Метод

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
Результат byte[]

GetOffset() публичный Метод

return the handle minus the handle-type (top byte) field
public GetOffset ( ) : uint
Результат uint

GetQualifiedName() публичный статический Метод

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
Результат byte[]

GetRangeLength() публичный статический Метод

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
Результат uint

GetType() публичный Метод

public GetType ( ) : Ht
Результат Ht

GetUnionSelector() публичный Метод

public GetUnionSelector ( ) : NameUnionTagValues
Результат NameUnionTagValues

HmacSession() публичный статический Метод

Create a HMAC handle given an index into the HMAC handle range
public static HmacSession ( uint handleIndex ) : TpmHandle
handleIndex uint
Результат TpmHandle

NV() публичный статический Метод

Return a handle to the the specified NV index
public static NV ( int slotIndex ) : TpmHandle
slotIndex int
Результат TpmHandle

NV() публичный статический Метод

Return a handle to the the specified NV index
public static NV ( uint slotIndex ) : TpmHandle
slotIndex uint
Результат TpmHandle

Pcr() публичный статический Метод

public static Pcr ( int pcrIndex ) : TpmHandle
pcrIndex int
Результат TpmHandle

Pcr() публичный статический Метод

Return a handle for the PCR of specified index
public static Pcr ( uint pcrIndex ) : TpmHandle
pcrIndex uint
Результат TpmHandle

Persistent() публичный статический Метод

Create a persistent handle given an index into the persistent handle range
public static Persistent ( uint handleIndex ) : TpmHandle
handleIndex uint
Результат TpmHandle

SetAuth() публичный Метод

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
Результат TpmHandle

SetName() публичный Метод

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
Результат TpmHandle

TpmHandle() публичный Метод

public TpmHandle ( ) : System
Результат System

TpmHandle() публичный Метод

Create a handle of the given type with the given numerical value.
public TpmHandle ( Ht handleType, uint offset ) : System
handleType Ht
offset uint
Результат System

TpmHandle() публичный Метод

public TpmHandle ( TpmHandle the_TpmHandle ) : System
the_TpmHandle TpmHandle
Результат System

TpmHandle() публичный Метод

Create a reserved TPM handle.
public TpmHandle ( TpmRh reservedHandle ) : System
reservedHandle TpmRh
Результат System

TpmHandle() публичный Метод

public TpmHandle ( uint the_handle ) : System
the_handle uint Handle value
Результат System

operator() публичный статический Метод

public static operator ( ) : ParametrizedHandle
Результат ParametrizedHandle

operator() публичный статический Метод

Returns true if the two arguments either are both null references or encapsulate the same TPM handle.
public static operator ( ) : bool
Результат bool