OpenTTD Source 20241224-master-gf74b0cf984
X25519SecretKey Struct Reference

Container for a X25519 secret key. More...

#include <network_crypto_internal.h>

Inheritance diagram for X25519SecretKey:
X25519Key

Public Member Functions

X25519PublicKey CreatePublicKey () const
 Create the public key associated with this secret key.
 
- Public Member Functions inherited from X25519Key
 ~X25519Key ()
 Ensure the key does not get leaked when we're done with it.
 

Static Public Member Functions

static X25519SecretKey CreateRandom ()
 Create a new secret key that's filled with random bytes.
 

Detailed Description

Container for a X25519 secret key.

Definition at line 34 of file network_crypto_internal.h.

Member Function Documentation

◆ CreatePublicKey()

X25519PublicKey X25519SecretKey::CreatePublicKey ( ) const

Create the public key associated with this secret key.

Returns
The public key.

Definition at line 156 of file network_crypto.cpp.

◆ CreateRandom()

X25519SecretKey X25519SecretKey::CreateRandom ( )
static

Create a new secret key that's filled with random bytes.

Returns
The randomly filled key.

Definition at line 145 of file network_crypto.cpp.

References RandomBytesWithFallback().

Referenced by NetworkAuthenticationServerHandler::Create(), and X25519AuthorizedKeyClientHandler::GetValidSecretKeyAndUpdatePublicKey().


The documentation for this struct was generated from the following files: