C# 클래스 Tpm2Lib.TpmHash

상속: TpmStructureBase, ISignatureUnion
파일 보기 프로젝트 열기: Microsoft/TSS.MSR 1 사용 예제들

Private Properties

프로퍼티 타입 설명
ISignatureUnion TpmAlgId
ToStringInternal void
TpmHash System

공개 메소드들

메소드 설명
AllOnesHash ( TpmAlgId alg ) : TpmHash

Return a TpmHash of the specified algorithm with value set to 0x01010101... Note that this is not a 'real' hash value, but is the initialization value of some resettable PCR

BlockSize ( TpmAlgId hashAlg ) : ushort

Return the hash function block size in bytes

DigestSize ( TpmAlgId hashAlg ) : ushort

Return the length of the output of the hash function in bytes

Equals ( Object obj ) : bool
Event ( byte dataToExtend ) : TpmHash

Replace the hash value with the hash of the concatenation of the current hash value and DataToExtend

Extend ( Object objectToExtend ) : TpmHash

Replace the hash value with the hash of the concatenation of the current value and the TPM representation of objectToExtend

FromData ( TpmAlgId hashAlg, byte dataToHash ) : TpmHash

Return a new TpmHash set to the hash of the supplied data

FromObject ( TpmAlgId hashAlg, Object data ) : TpmHash

Make a new TpmHash from the hash of the TPM representation of data

FromRandom ( TpmAlgId hashAlg ) : TpmHash

Return a new TpmHash that is the hash of random data

FromString ( TpmAlgId hashAlg, string password ) : TpmHash

Return a TpmHash that is the hash of Encoding.Unicode.GetBytes(password)

GetHashCode ( ) : int
GetUnionSelector ( ) : TpmAlgId
TpmHash ( ) : System

Create a new TpmHash with no associated hash algorithm (generally this should only be used prior to object de-serialization)

TpmHash ( TpmAlgId hashAlgId ) : System

Create an all-zeroes TpmHash with the named hash algorithm

TpmHash ( TpmAlgId hashAlg, byte digest ) : System

Create a TpmHash from the provided digest and hash algorithm. The number of bytes in the digest must match the hash size.

ZeroHash ( TpmAlgId alg ) : TpmHash

Return a TpmHash of specified algorithm set to all zeroes

operator ( ) : bool

Returns true if the two hashes are equal, i.e. if both hash algorithms and digests are the same. When this operator is used to compare a hash object with a byte buffer representing digest, the latter is converted to a hash object with its hash algorithm set to null, which excludes the algorithms from comparison).

비공개 메소드들

메소드 설명
ISignatureUnion ( ) : TpmAlgId
ToStringInternal ( TpmStructPrinter p ) : void
TpmHash ( byte digest ) : System

Create a TpmHash from the provided digest. Intended to be used by the conversion from byte[] operator to construct temporary object hash objects for the purposes of comparison.

메소드 상세

AllOnesHash() 공개 정적인 메소드

Return a TpmHash of the specified algorithm with value set to 0x01010101... Note that this is not a 'real' hash value, but is the initialization value of some resettable PCR
public static AllOnesHash ( TpmAlgId alg ) : TpmHash
alg TpmAlgId
리턴 TpmHash

BlockSize() 공개 정적인 메소드

Return the hash function block size in bytes
public static BlockSize ( TpmAlgId hashAlg ) : ushort
hashAlg TpmAlgId
리턴 ushort

DigestSize() 공개 정적인 메소드

Return the length of the output of the hash function in bytes
public static DigestSize ( TpmAlgId hashAlg ) : ushort
hashAlg TpmAlgId
리턴 ushort

Equals() 공개 메소드

public Equals ( Object obj ) : bool
obj Object
리턴 bool

Event() 공개 메소드

Replace the hash value with the hash of the concatenation of the current hash value and DataToExtend
public Event ( byte dataToExtend ) : TpmHash
dataToExtend byte
리턴 TpmHash

Extend() 공개 메소드

Replace the hash value with the hash of the concatenation of the current value and the TPM representation of objectToExtend
public Extend ( Object objectToExtend ) : TpmHash
objectToExtend Object
리턴 TpmHash

FromData() 공개 정적인 메소드

Return a new TpmHash set to the hash of the supplied data
public static FromData ( TpmAlgId hashAlg, byte dataToHash ) : TpmHash
hashAlg TpmAlgId
dataToHash byte
리턴 TpmHash

FromObject() 공개 정적인 메소드

Make a new TpmHash from the hash of the TPM representation of data
public static FromObject ( TpmAlgId hashAlg, Object data ) : TpmHash
hashAlg TpmAlgId
data Object
리턴 TpmHash

FromRandom() 공개 정적인 메소드

Return a new TpmHash that is the hash of random data
public static FromRandom ( TpmAlgId hashAlg ) : TpmHash
hashAlg TpmAlgId
리턴 TpmHash

FromString() 공개 정적인 메소드

Return a TpmHash that is the hash of Encoding.Unicode.GetBytes(password)
public static FromString ( TpmAlgId hashAlg, string password ) : TpmHash
hashAlg TpmAlgId
password string
리턴 TpmHash

GetHashCode() 공개 메소드

public GetHashCode ( ) : int
리턴 int

GetUnionSelector() 공개 메소드

public GetUnionSelector ( ) : TpmAlgId
리턴 TpmAlgId

TpmHash() 공개 메소드

Create a new TpmHash with no associated hash algorithm (generally this should only be used prior to object de-serialization)
public TpmHash ( ) : System
리턴 System

TpmHash() 공개 메소드

Create an all-zeroes TpmHash with the named hash algorithm
public TpmHash ( TpmAlgId hashAlgId ) : System
hashAlgId TpmAlgId
리턴 System

TpmHash() 공개 메소드

Create a TpmHash from the provided digest and hash algorithm. The number of bytes in the digest must match the hash size.
public TpmHash ( TpmAlgId hashAlg, byte digest ) : System
hashAlg TpmAlgId Hash algorithm used to compute digest
digest byte Byte array representing digest
리턴 System

ZeroHash() 공개 정적인 메소드

Return a TpmHash of specified algorithm set to all zeroes
public static ZeroHash ( TpmAlgId alg ) : TpmHash
alg TpmAlgId
리턴 TpmHash

operator() 공개 정적인 메소드

Returns true if the two hashes are equal, i.e. if both hash algorithms and digests are the same. When this operator is used to compare a hash object with a byte buffer representing digest, the latter is converted to a hash object with its hash algorithm set to null, which excludes the algorithms from comparison).
public static operator ( ) : bool
리턴 bool