|
OSDP.Net 5.2.1
A .NET library for implementing the Open Supervised Device Protocol (OSDP)
|
Security context used within MessageSecureChannel. More...
Public Member Functions | |
| SecurityContext (byte[] securityKey=null) | |
| Represents a security context for OSDP secure channel. | |
| void | Reset (byte[] securityKey=null) |
| Resets secure channel back to its initial state. | |
Properties | |
| bool | IsInitialized [get] |
| Gets a value indicating whether the security context is initialized. | |
| bool | IsUsingDefaultKey [get, set] |
| Gets a value indicating whether the security context is using the default key. | |
Security context used within MessageSecureChannel.
This state data is placed into its own class to facilitate use cases where multiple channels (i.e. one for incoming packets; one for outgoing) have to share the same security state.
Definition at line 12 of file SecurityContext.cs.
|
inline |
Resets secure channel back to its initial state.
| securityKey | Can be optionally passed in to change the security key. If null, existing key (or default one, SCBK-D) will be used if one was never specified currently used |
Definition at line 34 of file SecurityContext.cs.
References IsInitialized, and IsUsingDefaultKey.
|
get |
Gets a value indicating whether the security context is initialized.
true if the security context is initialized; otherwise, false.
Definition at line 122 of file SecurityContext.cs.
Referenced by Reset().
|
getset |
Gets a value indicating whether the security context is using the default key.
true if the security context is using the default key; otherwise, false.
For live channels this is derived from the configured security key. For passive parsing (see OSDP.Net.Tracing.MessageSpy) it is set from the key type observed in the secure channel handshake, which is the authoritative indicator of what the wire actually used.
Definition at line 135 of file SecurityContext.cs.
Referenced by Reset().