MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / getKey

Method getKey

src/Compression/CompressionCodecEncrypted.cpp:458–474  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

456}
457
458String CompressionCodecEncrypted::Configuration::getKey(EncryptionMethod method, const UInt64 & key_id) const
459{
460 String key;
461 /// See description of previous finction, logic is the same.
462 if (!params.get())
463 throw Exception(ErrorCodes::BAD_ARGUMENTS, "Empty params in CompressionCodecEncrypted configuration");
464
465 const auto current_params = params.get();
466
467 /// check if there is current key in storage
468 if (current_params->keys_storage[method].contains(key_id))
469 key = current_params->keys_storage[method].at(key_id);
470 else
471 throw Exception(ErrorCodes::BAD_ARGUMENTS, "There is no key {} in config for {} encryption codec", key_id, getMethodName(method));
472
473 return key;
474}
475
476
477CompressionCodecEncrypted::CompressionCodecEncrypted(EncryptionMethod Method): encryption_method(Method)

Callers 15

serializeMethod · 0.45
eraseMethod · 0.45
initializeSystemNodesMethod · 0.45
createNodeMethod · 0.45
readMethod · 0.45
getSetKeyFromCellFunction · 0.45
getKeyFromCellFunction · 0.45
getCachedKeysImplMethod · 0.45
insertCellMethod · 0.45
eraseKeyFromIndexMethod · 0.45
updateMethod · 0.45

Calls 5

getMethodNameFunction · 0.85
ExceptionClass · 0.70
getMethod · 0.45
containsMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected