|
OSDP.Net 5.2.1
A .NET library for implementing the Open Supervised Device Protocol (OSDP)
|
Provides functionality to parse and decode OSDP messages from raw byte data, tracking secure channel state for encrypted communications. More...
Public Member Functions | |
| MessageSpy (byte[]? securityKey=null) | |
| Initializes a new instance of the MessageSpy class with an optional security key. | |
| byte | PeekAddressByte (ReadOnlySpan< byte > data) |
| Retrieves the address byte from raw OSDP data without parsing the entire message. | |
| IncomingMessage | ParseCommand (byte[] data) |
| Parses raw OSDP command data into an IncomingMessage, handling the secure channel establishment. | |
| IncomingMessage | ParseReply (byte[] data) |
| Parses raw OSDP reply data into an IncomingMessage, handling the secure channel establishment. | |
| Packet | ParsePacket (byte[] data) |
| Parses raw OSDP data into a Packet, automatically detecting command vs. | |
| bool | TryParsePacket (byte[] data, out Packet? packet) |
| Attempts to parse raw OSDP data into a Packet without throwing exceptions. | |
| IEnumerable< OSDPCaptureEntry > | ParseCaptureFile (string json) |
| Parses an OSDP capture file in JSON format. | |
Provides functionality to parse and decode OSDP messages from raw byte data, tracking secure channel state for encrypted communications.
Definition at line 20 of file MessageSpy.cs.
|
inline |
Initializes a new instance of the MessageSpy class with an optional security key.
| securityKey | Optional encryption key for decrypting secure channel packets. If null, only non-encrypted packets can be fully parsed. |
Definition at line 32 of file MessageSpy.cs.
|
inline |
Parses an OSDP capture file in JSON format.
| json | The JSON content of the capture file. |
Definition at line 198 of file MessageSpy.cs.
References OSDP.Net.Utilities.BinaryUtils.HexToBytes(), and ParsePacket().
|
inline |
Parses raw OSDP command data into an IncomingMessage, handling the secure channel establishment.
| data | Raw OSDP command data, optionally prefixed with one or more 0xFF mark bytes, followed by the SOM byte. |
Definition at line 71 of file MessageSpy.cs.
References OSDP.Net.Messages.KeySet, OSDP.Net.Messages.ServerCryptogram, and OSDP.Net.Messages.SessionChallenge.
Referenced by ParsePacket().
|
inline |
Parses raw OSDP data into a Packet, automatically detecting command vs.
reply.
| data | Raw OSDP message data starting with SOM byte. |
Definition at line 164 of file MessageSpy.cs.
References ParseCommand(), ParseReply(), and PeekAddressByte().
Referenced by ParseCaptureFile(), and TryParsePacket().
|
inline |
Parses raw OSDP reply data into an IncomingMessage, handling the secure channel establishment.
| data | Raw OSDP reply data, optionally prefixed with one or more 0xFF mark bytes, followed by the SOM byte. |
Definition at line 106 of file MessageSpy.cs.
References OSDP.Net.Messages.InitialRMac.
Referenced by ParsePacket().
|
inline |
Retrieves the address byte from raw OSDP data without parsing the entire message.
| data | Raw OSDP message data, optionally prefixed with one or more 0xFF mark bytes, followed by the SOM byte. |
Definition at line 44 of file MessageSpy.cs.
Referenced by ParsePacket().
|
inline |
Attempts to parse raw OSDP data into a Packet without throwing exceptions.
| data | Raw OSDP message data starting with SOM byte. |
| packet | When successful, contains the parsed Packet. |
Definition at line 179 of file MessageSpy.cs.
References ParsePacket().