MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / CreateRandom

Method CreateRandom

src/network/network_crypto.cpp:145–150  ·  view source on GitHub ↗

* Create a new secret key that's filled with random bytes. * @return The randomly filled key. */ static */

Source from the content-addressed store, hash-verified

143 * @return The randomly filled key.
144 */
145/* static */ X25519SecretKey X25519SecretKey::CreateRandom()
146{
147 X25519SecretKey secret_key;
148 RandomBytesWithFallback(secret_key);
149 return secret_key;
150}
151
152/**
153 * Create the public key associated with this secret key.

Callers

nothing calls this directly

Calls 1

RandomBytesWithFallbackFunction · 0.85

Tested by

no test coverage detected