Example #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");
         }
     }
 }
Example #2
0
 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");
         }
     }
 }
Example #3
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");
         }
     }
 }
Example #4
0
 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");
         }
     }
 }