示例#1
0
        public static bool AreAnySlotsFull(Tpm2 tpm)
        {
            var tagActiveSession = TpmHelpers.GetEnumerator <Ht>("ActiveSession", "SavedSession");

            return(TpmHelper.GetLoadedEntities(tpm, Ht.Transient).Length != 0 ||
                   TpmHelper.GetLoadedEntities(tpm, Ht.LoadedSession).Length != 0 ||
                   TpmHelper.GetLoadedEntities(tpm, Ht.LoadedSession).Length != 0);
        }
示例#2
0
 /// <summary>
 /// A Tpm2 must be created attached to an underlying device
 /// </summary>
 /// <param name="device"></param>
 /// <param name="mode"></param>
 public Tpm2(Tpm2Device device, Behavior b = Behavior.Default)
 {
     Device = device;
     _Behavior = b;
     Sessions = new SessionBase[0];
     Helpers = new TpmHelpers(this);
 }