OpenTTD Source: NetworkAuthenticationHandler Class Reference

OpenTTD Source 15.0-RC2

Public Member Functions
NetworkAuthenticationHandler Class Referenceabstract

Base class for cryptographic authentication handlers. More...

`#include <network_crypto.h>`

Inheritance diagram for NetworkAuthenticationHandler:

## Public Member Functions
virtual std::string_view | GetName () const =0
| Get the name of the handler for debug messages.
virtual NetworkAuthenticationMethod | GetAuthenticationMethod () const =0
| Get the method this handler is providing functionality for.
virtual std::unique_ptr< NetworkEncryptionHandler > | CreateClientToServerEncryptionHandler () const =0
| Create a NetworkEncryptionHandler to encrypt or decrypt messages from the client to the server.
virtual std::unique_ptr< NetworkEncryptionHandler > | CreateServerToClientEncryptionHandler () const =0
| Create a NetworkEncryptionHandler to encrypt or decrypt messages from the server to the client.

## Detailed Description

Base class for cryptographic authentication handlers.

Definition at line 190 of file network_crypto.h.

## Member Function Documentation

## ◆ CreateClientToServerEncryptionHandler()

virtual std::unique_ptr< NetworkEncryptionHandler > NetworkAuthenticationHandler::CreateClientToServerEncryptionHandler | ( |  | ) | const
| pure virtual

Create a NetworkEncryptionHandler to encrypt or decrypt messages from the client to the server.

Returns
  The handler for the client to server encryption.

Implemented in X25519KeyExchangeOnlyClientHandler, X25519KeyExchangeOnlyServerHandler, X25519PAKEClientHandler, X25519PAKEServerHandler, X25519AuthorizedKeyClientHandler, X25519AuthorizedKeyServerHandler, CombinedAuthenticationClientHandler, and CombinedAuthenticationServerHandler.

Referenced by CombinedAuthenticationClientHandler::CreateClientToServerEncryptionHandler().

## ◆ CreateServerToClientEncryptionHandler()

virtual std::unique_ptr< NetworkEncryptionHandler > NetworkAuthenticationHandler::CreateServerToClientEncryptionHandler | ( |  | ) | const
| pure virtual

Create a NetworkEncryptionHandler to encrypt or decrypt messages from the server to the client.

Returns
  The handler for the server to client encryption.

Implemented in X25519KeyExchangeOnlyClientHandler, X25519KeyExchangeOnlyServerHandler, X25519PAKEClientHandler, X25519PAKEServerHandler, X25519AuthorizedKeyClientHandler, X25519AuthorizedKeyServerHandler, CombinedAuthenticationClientHandler, and CombinedAuthenticationServerHandler.

Referenced by CombinedAuthenticationClientHandler::CreateServerToClientEncryptionHandler().

## ◆ GetAuthenticationMethod()

virtual NetworkAuthenticationMethod NetworkAuthenticationHandler::GetAuthenticationMethod | ( |  | ) | const
| pure virtual

Get the method this handler is providing functionality for.

Returns
  The `NetworkAuthenticationMethod`.

Implemented in X25519KeyExchangeOnlyClientHandler, X25519KeyExchangeOnlyServerHandler, X25519PAKEClientHandler, X25519PAKEServerHandler, X25519AuthorizedKeyClientHandler, X25519AuthorizedKeyServerHandler, CombinedAuthenticationClientHandler, and CombinedAuthenticationServerHandler.

Referenced by CombinedAuthenticationClientHandler::GetAuthenticationMethod().

## ◆ GetName()

virtual std::string_view NetworkAuthenticationHandler::GetName | ( |  | ) | const
| pure virtual

Get the name of the handler for debug messages.

Returns
  The name of the handler.

Implemented in X25519KeyExchangeOnlyClientHandler, X25519KeyExchangeOnlyServerHandler, X25519PAKEClientHandler, X25519PAKEServerHandler, X25519AuthorizedKeyClientHandler, X25519AuthorizedKeyServerHandler, CombinedAuthenticationClientHandler, and CombinedAuthenticationServerHandler.

Referenced by CombinedAuthenticationClientHandler::GetName().

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

- src/network/network_crypto.h