C# Class Tpm2Lib.AuthValue

Inheritance: TpmStructureBase
Show file Open project: Microsoft/TSS.MSR Class Usage Examples

Public Methods

Method Description
AuthValue ( ) : System

Create an zero-length AuthValue

AuthValue ( byte auth ) : System

Create an AuthValue with the specified value. Note that trailing zeros are not removed.

Equals ( Object obj ) : bool
FromRandom ( int numBytes ) : AuthValue

Creates an auth value comprising the specified number of random bytes. Since the TPM removes trailing zeros, this routine makes sure that the last byte is non-zero.

FromString ( TpmAlgId hashAlg, string password ) : AuthValue

Create an AuthValue from the hash of the string. See TpmHash.FromString for the transformation used.

GetHashCode ( ) : int
operator ( ) : bool

Returns true if the two arguments either are both null references or contain equal authorization values.

Private Methods

Method Description
IsNull ( AuthValue auth ) : bool

Method Details

AuthValue() public method

Create an zero-length AuthValue
public AuthValue ( ) : System
return System

AuthValue() public method

Create an AuthValue with the specified value. Note that trailing zeros are not removed.
public AuthValue ( byte auth ) : System
auth byte
return System

Equals() public method

public Equals ( Object obj ) : bool
obj Object
return bool

FromRandom() public static method

Creates an auth value comprising the specified number of random bytes. Since the TPM removes trailing zeros, this routine makes sure that the last byte is non-zero.
public static FromRandom ( int numBytes ) : AuthValue
numBytes int
return AuthValue

FromString() public static method

Create an AuthValue from the hash of the string. See TpmHash.FromString for the transformation used.
public static FromString ( TpmAlgId hashAlg, string password ) : AuthValue
hashAlg TpmAlgId
password string
return AuthValue

GetHashCode() public method

public GetHashCode ( ) : int
return int

operator() public static method

Returns true if the two arguments either are both null references or contain equal authorization values.
public static operator ( ) : bool
return bool