78 ReadOnlySpan<byte>
GenerateMac(ReadOnlySpan<byte> message,
bool isIncoming);
Represents the secure channel context within which a message is packed/unpacked.
byte[] ServerRandomNumber
Represents the server random number used in the secure channel context.
bool IsInitialized
Gets a value indicating whether the secure channel is initialized.
bool IsUsingDefaultKey
Gets a value indicating whether the secure channel is using the default key.
void Establish(byte[] rmac)
Establishes the secure channel with the provided RMAC.
ReadOnlySpan< byte > GenerateMac(ReadOnlySpan< byte > message, bool isIncoming)
Generates a new Message Authentication Code.
void EncodePayload(byte[] payload, Span< byte > destination)
Encrypts the payload using the secure channel context.
void InitializeACU(byte[] clientRandomNumber, byte[] clientCryptogram)
Initializes the Access Control Unit (ACU) in the secure channel context.
byte[] ServerCryptogram
Represents the secure channel cryptogram used by the server.
byte[] DecodePayload(byte[] payload)
Decodes the payload using the secure channel context.
bool IsSecurityEstablished
Indicates whether or not a secure channel has been established on the current message channel.
void ResetSecureChannelSession()
Resets the secure channel session by creating a new random number.
ReadOnlySpan< byte > PadTheData(ReadOnlySpan< byte > payload)
Pads the given data with padding bytes to make it a multiple of a specified length.