OpenTTD Source 20241224-master-gee860a5c8e
X25519Nonce Struct Reference

Container for a X25519 nonce that is automatically crypto-wiped when destructed. More...

#include <network_crypto_internal.h>

Inheritance diagram for X25519Nonce:

Public Member Functions

 ~X25519Nonce ()
 Ensure the nonce does not get leaked when we're done with it.
 

Static Public Member Functions

static X25519Nonce CreateRandom ()
 Create a new nonce that's filled with random bytes.
 

Detailed Description

Container for a X25519 nonce that is automatically crypto-wiped when destructed.

Definition at line 40 of file network_crypto_internal.h.

Constructor & Destructor Documentation

◆ ~X25519Nonce()

X25519Nonce::~X25519Nonce ( )

Ensure the nonce does not get leaked when we're done with it.

Definition at line 175 of file network_crypto.cpp.

References crypto_wipe().

Member Function Documentation

◆ CreateRandom()

X25519Nonce X25519Nonce::CreateRandom ( )
static

Create a new nonce that's filled with random bytes.

Returns
The randomly filled nonce.

Definition at line 167 of file network_crypto.cpp.

References RandomBytesWithFallback().


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