OpenTTD Source: X25519Nonce Struct Reference

OpenTTD Source 15.0-RC2

Public Member Functions | Static Public Member Functions
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:

- src/network/network_crypto_internal.h
- src/network/network_crypto.cpp