OSDP.Net 5.2.1
A .NET library for implementing the Open Supervised Device Protocol (OSDP)
Loading...
Searching...
No Matches
AuthenticationChallengeFragment.cs
1using System;
4
6
10public class AuthenticationChallengeFragment(MessageDataFragment fragment) : CommandData
11{
15 public MessageDataFragment Fragment { get; } = fragment;
16
18 public override CommandType CommandType => CommandType.AuthenticateChallenge;
19
21 public override byte Code => (byte)CommandType;
22
24 public override ReadOnlySpan<byte> SecurityControlBlock() => SecurityBlock.CommandMessageWithDataSecurity;
25
27 public override byte[] BuildData()
28 {
29 return Fragment.BuildData().ToArray();
30 }
31
35 public static AuthenticationChallengeFragment ParseData(ReadOnlySpan<byte> data)
36 {
37 return new AuthenticationChallengeFragment(MessageDataFragment.ParseData(data, MessageDataFragmentFieldSize.TwoBytes));
38 }
39}
Base class representing a payload of a PD command message.
Represents a fragment of data for a multipart message.
byte[] BuildData()
Converts the payload into a byte array to be sent over the wire.
CommandType
Identifies the type of OSDP protocol command (ACU -> PD) message.
Definition CommandType.cs:7
MessageDataFragmentFieldSize
Defines the field size used for the MessageDataFragment.TotalSize and MessageDataFragment....