public byte[] PolicySecret( TpmHandle authHandle, TpmHandle policySession, byte[] nonceTPM, byte[] cpHashA, byte[] policyRef, int expiration, [SuppressMessage("Microsoft.Design", "CA1021")] out TkAuth policyTicket ) { Tpm2PolicySecretRequest inS = new Tpm2PolicySecretRequest(); inS.authHandle = authHandle; inS.policySession = policySession; inS.nonceTPM = nonceTPM; inS.cpHashA = cpHashA; inS.policyRef = policyRef; inS.expiration = expiration; TpmStructureBase outSBase; DispatchMethod(TpmCc.PolicySecret, (TpmStructureBase) inS, typeof(Tpm2PolicySecretResponse), out outSBase, 2, 0); Tpm2PolicySecretResponse outS = (Tpm2PolicySecretResponse) outSBase; policyTicket = outS.policyTicket; return outS.timeout; }
public Tpm2PolicySecretRequest(Tpm2PolicySecretRequest the_Tpm2PolicySecretRequest) { if((Object) the_Tpm2PolicySecretRequest == null ) throw new ArgumentException(Globs.GetResourceString("parmError")); authHandle = the_Tpm2PolicySecretRequest.authHandle; policySession = the_Tpm2PolicySecretRequest.policySession; nonceTPM = the_Tpm2PolicySecretRequest.nonceTPM; cpHashA = the_Tpm2PolicySecretRequest.cpHashA; policyRef = the_Tpm2PolicySecretRequest.policyRef; expiration = the_Tpm2PolicySecretRequest.expiration; }