OSDP.Net 5.2.1
A .NET library for implementing the Open Supervised Device Protocol (OSDP)
Loading...
Searching...
No Matches
OSDP.Net.Model.CommandData.ServerCryptogramData Class Reference

Represents the server cryptogram data used in a secure communication sequence. More...

Inheritance diagram for OSDP.Net.Model.CommandData.ServerCryptogramData:
OSDP.Net.Model.CommandData.CommandData OSDP.Net.Model.PayloadData

Public Member Functions

 ServerCryptogramData (byte[] serverCryptogram, bool isDefaultKey)
override ReadOnlySpan< byte > SecurityControlBlock ()
override byte[] BuildData ()
Public Member Functions inherited from OSDP.Net.Model.PayloadData
byte[] BuildData ()
 Converts the payload into a byte array to be sent over the wire.
ReadOnlySpan< byte > SecurityControlBlock ()
 Retrieves the security control block for a specific command data type.
virtual void CustomMessageUpdate (Span< byte > messageBuffer)
 Updates the message data before sending in the specified byte buffer.

Static Public Member Functions

static ServerCryptogramData ParseData (ReadOnlySpan< byte > data, ReadOnlySpan< byte > securityControlBlock)
 Parses the message payload bytes.

Properties

byte[] ServerCryptogram [get]
 Gets the cryptographic data provided by the server during a secure communication exchange.
bool IsDefaultKey [get]
 Indicates whether the default encryption key is used for secure communications.
override CommandType CommandType [get]
override byte Code [get]
override bool IsSecurityInitialization [get]
Properties inherited from OSDP.Net.Model.CommandData.CommandData
CommandType CommandType [get]
 Message command code.
Properties inherited from OSDP.Net.Model.PayloadData
byte Code [get]
 Gets the command or reply code byte value that represent the type of data.
virtual bool IsSecurityInitialization [get]
 Gets a value indicating whether the security initialization is performed by this payload.

Additional Inherited Members

Static Protected Member Functions inherited from OSDP.Net.Model.CommandData.CommandData
static T[] SplitData< T > (int size, Func< byte[], T > parseDataFunction, ReadOnlySpan< byte > payloadData)
 Splits data into multiple elements of type T based on a specified size.

Detailed Description

Represents the server cryptogram data used in a secure communication sequence.

Encapsulates information such as the server cryptogram and whether a default key is being used.

Definition at line 11 of file ServerCryptogramData.cs.

Constructor & Destructor Documentation

◆ ServerCryptogramData()

OSDP.Net.Model.CommandData.ServerCryptogramData.ServerCryptogramData ( byte[] serverCryptogram,
bool isDefaultKey )
inline

Definition at line 14 of file ServerCryptogramData.cs.

References IsDefaultKey, and ServerCryptogram.

Referenced by ParseData().

Member Function Documentation

◆ BuildData()

override byte[] OSDP.Net.Model.CommandData.ServerCryptogramData.BuildData ( )
inline

Definition at line 53 of file ServerCryptogramData.cs.

References ServerCryptogram.

◆ ParseData()

ServerCryptogramData OSDP.Net.Model.CommandData.ServerCryptogramData.ParseData ( ReadOnlySpan< byte > data,
ReadOnlySpan< byte > securityControlBlock )
inlinestatic

Parses the message payload bytes.

Parameters
dataMessage payload as bytes
securityControlBlockSecurity control block as bytes
Returns
An instance of ServerCryptogram representing the message payload

Definition at line 64 of file ServerCryptogramData.cs.

References ServerCryptogramData().

◆ SecurityControlBlock()

override ReadOnlySpan< byte > OSDP.Net.Model.CommandData.ServerCryptogramData.SecurityControlBlock ( )
inline

Definition at line 42 of file ServerCryptogramData.cs.

References IsDefaultKey.

Property Documentation

◆ Code

override byte OSDP.Net.Model.CommandData.ServerCryptogramData.Code
get

Definition at line 36 of file ServerCryptogramData.cs.

◆ CommandType

override CommandType OSDP.Net.Model.CommandData.ServerCryptogramData.CommandType
get

Definition at line 33 of file ServerCryptogramData.cs.

◆ IsDefaultKey

bool OSDP.Net.Model.CommandData.ServerCryptogramData.IsDefaultKey
get

Indicates whether the default encryption key is used for secure communications.

This property specifies if the default key is applied during the security initialization process.

Definition at line 30 of file ServerCryptogramData.cs.

Referenced by SecurityControlBlock(), and ServerCryptogramData().

◆ IsSecurityInitialization

override bool OSDP.Net.Model.CommandData.ServerCryptogramData.IsSecurityInitialization
get

Definition at line 39 of file ServerCryptogramData.cs.

◆ ServerCryptogram

byte [] OSDP.Net.Model.CommandData.ServerCryptogramData.ServerCryptogram
get

Gets the cryptographic data provided by the server during a secure communication exchange.

This property holds the server's cryptogram used for encrypting or authenticating messages.

Definition at line 24 of file ServerCryptogramData.cs.

Referenced by BuildData(), and ServerCryptogramData().


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