OSDP.Net 5.2.1
A .NET library for implementing the Open Supervised Device Protocol (OSDP)
Loading...
Searching...
No Matches
OSDP.Net.Messages.SecureChannel.SecurityContext Class Reference

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.

Detailed Description

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.

Member Function Documentation

◆ Reset()

void OSDP.Net.Messages.SecureChannel.SecurityContext.Reset ( byte[] securityKey = null)
inline

Resets secure channel back to its initial state.

Parameters
securityKeyCan 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.

Property Documentation

◆ IsInitialized

bool OSDP.Net.Messages.SecureChannel.SecurityContext.IsInitialized
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().

◆ IsUsingDefaultKey

bool OSDP.Net.Messages.SecureChannel.SecurityContext.IsUsingDefaultKey
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().


The documentation for this class was generated from the following file: