public static TpmHandle[] GetLoadedEntities(Tpm2 tpm, Ht rangeToQuery) { uint maxHandles = UInt32.MaxValue; ICapabilitiesUnion h = null; byte moreData = tpm.GetCapability(Cap.Handles, ((uint)rangeToQuery) << 24, maxHandles, out h); if (moreData != 0) { throw new NotImplementedException( "GetLoadedEntities: Too much data returned"); } if (h.GetType() != typeof(HandleArray)) { throw new Exception( "GetLoadedEntities: Incorrect capability type requested"); } return((h as HandleArray).handle); }
///<param name = "the_data">the capability data(One of AlgPropertyArray, HandleArray, CcaArray, CcArray, CcArray, PcrSelectionArray, TaggedTpmPropertyArray, TaggedPcrPropertyArray, EccCurveArray)</param> public CapabilityData( ICapabilitiesUnion the_data ) { this.data = the_data; }
///<param name = "the_moreData">flag to indicate if there are more values of this type</param> ///<param name = "the_capabilityData">the capability data(One of AlgPropertyArray, HandleArray, CcaArray, CcArray, CcArray, PcrSelectionArray, TaggedTpmPropertyArray, TaggedPcrPropertyArray, EccCurveArray)</param> public Tpm2GetCapabilityResponse( byte the_moreData, ICapabilitiesUnion the_capabilityData ) { this.moreData = the_moreData; this.capabilityData = the_capabilityData; }