Example #1
0
 public TpmHandle StartAuthSession(
     TpmHandle tpmKey,
     TpmHandle bind,
     byte[] nonceCaller,
     byte[] encryptedSalt,
     TpmSe sessionType,
     SymDef symmetric,
     TpmAlgId authHash,
     [SuppressMessage("Microsoft.Design", "CA1021")]
     out byte[] nonceTPM
 )
 {
     Tpm2StartAuthSessionRequest inS = new Tpm2StartAuthSessionRequest();
     inS.tpmKey = tpmKey;
     inS.bind = bind;
     inS.nonceCaller = nonceCaller;
     inS.encryptedSalt = encryptedSalt;
     inS.sessionType = sessionType;
     inS.symmetric = symmetric;
     inS.authHash = authHash;
     TpmStructureBase outSBase;
     DispatchMethod(TpmCc.StartAuthSession, (TpmStructureBase) inS, typeof(Tpm2StartAuthSessionResponse), out outSBase, 2, 1);
     Tpm2StartAuthSessionResponse outS = (Tpm2StartAuthSessionResponse) outSBase;
     nonceTPM = outS.nonceTPM;
     return outS.sessionHandle;
 }
Example #2
0
 public Tpm2StartAuthSessionRequest(Tpm2StartAuthSessionRequest the_Tpm2StartAuthSessionRequest)
 {
     if((Object) the_Tpm2StartAuthSessionRequest == null ) throw new ArgumentException(Globs.GetResourceString("parmError"));
     tpmKey = the_Tpm2StartAuthSessionRequest.tpmKey;
     bind = the_Tpm2StartAuthSessionRequest.bind;
     nonceCaller = the_Tpm2StartAuthSessionRequest.nonceCaller;
     encryptedSalt = the_Tpm2StartAuthSessionRequest.encryptedSalt;
     sessionType = the_Tpm2StartAuthSessionRequest.sessionType;
     symmetric = the_Tpm2StartAuthSessionRequest.symmetric;
     authHash = the_Tpm2StartAuthSessionRequest.authHash;
 }