OpenTTD Source
20241121-master-g67a0fccfad
|
Base class for handling the encryption (or decryption) of a network connection. More...
#include <network_crypto.h>
Public Member Functions | |
virtual size_t | MACSize () const =0 |
Get the size of the MAC (Message Authentication Code) used by the underlying encryption protocol. More... | |
virtual bool | Decrypt (std::span< std::uint8_t > mac, std::span< std::uint8_t > message)=0 |
Decrypt the given message in-place, validating against the given MAC. More... | |
virtual void | Encrypt (std::span< std::uint8_t > mac, std::span< std::uint8_t > message)=0 |
Encrypt the given message in-place, and write the associated MAC. More... | |
Base class for handling the encryption (or decryption) of a network connection.
Definition at line 41 of file network_crypto.h.
|
pure virtual |
Decrypt the given message in-place, validating against the given MAC.
mac | The message authentication code (MAC). |
message | The location of the message to decrypt. |
Implemented in X25519EncryptionHandler.
|
pure virtual |
Encrypt the given message in-place, and write the associated MAC.
mac | The location to write the message authentication code (MAC) to. |
message | The location of the message to encrypt. |
Implemented in X25519EncryptionHandler.
|
pure virtual |
Get the size of the MAC (Message Authentication Code) used by the underlying encryption protocol.
Implemented in X25519EncryptionHandler.