MCPcopy Create free account
hub / github.com/apple/foundationdb / allocGlobalCipherKey

Method allocGlobalCipherKey

flow/StreamCipher.cpp:37–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37void StreamCipherKey::allocGlobalCipherKey() {
38 if (StreamCipherKey::isGlobalKeyPresent()) {
39 return;
40 }
41 StreamCipherKey::globalKeyId = deterministicRandom()->randomUniqueID();
42 StreamCipherKey::globalKey = std::make_unique<StreamCipherKey>(AES_256_KEY_LENGTH);
43 StreamCipherKey::cipherKeys[StreamCipherKey::globalKeyId] = StreamCipherKey::globalKey.get();
44}
45
46void StreamCipherKey::initializeGlobalRandomTestKey() {
47 if (!StreamCipherKey::isGlobalKeyPresent()) {

Callers

nothing calls this directly

Calls 3

deterministicRandomFunction · 0.85
randomUniqueIDMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected