public TpmPrivate Import( TpmHandle parentHandle, byte[] encryptionKey, TpmPublic objectPublic, TpmPrivate duplicate, byte[] inSymSeed, SymDefObject symmetricAlg ) { Tpm2ImportRequest inS = new Tpm2ImportRequest(); inS.parentHandle = parentHandle; inS.encryptionKey = encryptionKey; inS.objectPublic = objectPublic; inS.duplicate = duplicate; inS.inSymSeed = inSymSeed; inS.symmetricAlg = symmetricAlg; TpmStructureBase outSBase; DispatchMethod(TpmCc.Import, (TpmStructureBase) inS, typeof(Tpm2ImportResponse), out outSBase, 1, 0); Tpm2ImportResponse outS = (Tpm2ImportResponse) outSBase; return outS.outPrivate; }
public Tpm2ImportRequest(Tpm2ImportRequest the_Tpm2ImportRequest) { if((Object) the_Tpm2ImportRequest == null ) throw new ArgumentException(Globs.GetResourceString("parmError")); parentHandle = the_Tpm2ImportRequest.parentHandle; encryptionKey = the_Tpm2ImportRequest.encryptionKey; objectPublic = the_Tpm2ImportRequest.objectPublic; duplicate = the_Tpm2ImportRequest.duplicate; inSymSeed = the_Tpm2ImportRequest.inSymSeed; symmetricAlg = the_Tpm2ImportRequest.symmetricAlg; }