コード例 #1
0
 public AuthSession(ParametrizedHandle ph)
 {
     if (ph.Handle != TpmRh.None && !ph.Handle.IsSession())
     {
         Globs.Throw <ArgumentException>("AuthSession: Attempt to construct from parametrized non-session handle");
     }
     Handle = ph.Handle;
     foreach (object param in ph.Params)
     {
         if (param is SessionAttr)
         {
             Attrs = (SessionAttr)param;
         }
         else if (param is byte[])
         {
             Salt = (byte[])param;
         }
         else if (param != null)
         {
             Globs.Throw <ArgumentException>("AuthSession: Attempt to construct from malformed parametrized handle");
         }
     }
 }
コード例 #2
0
ファイル: Sessions.cs プロジェクト: alex1818/TSS.MSR
 public AuthSession(ParametrizedHandle ph)
 {
     if (ph.Handle != TpmRh.None && !ph.Handle.IsSession())
     {
         throw new Exception("Attempt to construct AuthSession object from parametrized non-session handle");
     }
     Handle = ph.Handle;
     foreach (object param in ph.Params)
     {
         if (param is SessionAttr)
         {
             Attrs = (SessionAttr)param;
         }
         else if (param is byte[])
         {
             Salt = (byte[])param;
         }
         else if (param != null)
         {
             throw new Exception("Attempt to construct AuthSession object from parametrized non-session handle");
         }
     }
 }
コード例 #3
0
ファイル: Sessions.cs プロジェクト: Microsoft/TSS.MSR
 public AuthSession(ParametrizedHandle ph)
 {
     if (ph.Handle != TpmRh.None && !ph.Handle.IsSession())
     {
         Globs.Throw<ArgumentException>("AuthSession: Attempt to construct from parametrized non-session handle");
     }
     Handle = ph.Handle;
     foreach(object param in ph.Params)
     {
         if (param is SessionAttr)
         {
             Attrs = (SessionAttr)param;
         }
         else if (param is byte[])
         {
             Salt = (byte[])param;
         }
         else if (param != null)
         {
             Globs.Throw<ArgumentException>("AuthSession: Attempt to construct from malformed parametrized handle");
         }
     }
 }
コード例 #4
0
ファイル: Sessions.cs プロジェクト: vishalishere/TSS.MSR
 public AuthSession(ParametrizedHandle ph)
 {
     if (ph.Handle != TpmRh.None && !ph.Handle.IsSession())
     {
         throw new Exception("Attempt to construct AuthSession object from parametrized non-session handle");
     }
     Handle = ph.Handle;
     foreach(object param in ph.Params)
     {
         if (param is SessionAttr)
         {
             Attrs = (SessionAttr)param;
         }
         else if (param is byte[])
         {
             Salt = (byte[])param;
         }
         else if (param != null)
         {
             throw new Exception("Attempt to construct AuthSession object from parametrized non-session handle");
         }
     }
 }