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"); } } }
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"); } } }
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"); } } }
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"); } } }