public TpmPrivate Create( TpmHandle parentHandle, SensitiveCreate inSensitive, TpmPublic inPublic, byte[] outsideInfo, PcrSelection[] creationPCR, [SuppressMessage("Microsoft.Design", "CA1021")] out TpmPublic outPublic, [SuppressMessage("Microsoft.Design", "CA1021")] out CreationData creationData, [SuppressMessage("Microsoft.Design", "CA1021")] out byte[] creationHash, [SuppressMessage("Microsoft.Design", "CA1021")] out TkCreation creationTicket ) { Tpm2CreateRequest inS = new Tpm2CreateRequest(); inS.parentHandle = parentHandle; inS.inSensitive = inSensitive; inS.inPublic = inPublic; inS.outsideInfo = outsideInfo; inS.creationPCR = creationPCR; TpmStructureBase outSBase; DispatchMethod(TpmCc.Create, (TpmStructureBase) inS, typeof(Tpm2CreateResponse), out outSBase, 1, 0); Tpm2CreateResponse outS = (Tpm2CreateResponse) outSBase; outPublic = outS.outPublic; creationData = outS.creationData; creationHash = outS.creationHash; creationTicket = outS.creationTicket; return outS.outPrivate; }
public async Task<Tpm2CreateResponse> CreateAsync( TpmHandle parentHandle, SensitiveCreate inSensitive, TpmPublic inPublic, byte[] outsideInfo, PcrSelection[] creationPCR) { var inS = new Tpm2CreateRequest { parentHandle = parentHandle, inSensitive = inSensitive, inPublic = inPublic, outsideInfo = outsideInfo, creationPCR = creationPCR }; TpmStructureBase outSBase = null; await Task.Run(() => DispatchMethod(TpmCc.Create, inS, typeof (Tpm2CreateResponse), out outSBase, 1, 0)); var outS = (Tpm2CreateResponse)outSBase; return outS; }
public Tpm2CreateRequest(Tpm2CreateRequest the_Tpm2CreateRequest) { if((Object) the_Tpm2CreateRequest == null ) throw new ArgumentException(Globs.GetResourceString("parmError")); parentHandle = the_Tpm2CreateRequest.parentHandle; inSensitive = the_Tpm2CreateRequest.inSensitive; inPublic = the_Tpm2CreateRequest.inPublic; outsideInfo = the_Tpm2CreateRequest.outsideInfo; creationPCR = the_Tpm2CreateRequest.creationPCR; }