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

Function getMethodCode

src/Compression/CompressionCodecEncrypted.cpp:55–62  ·  view source on GitHub ↗

Get method code (used for codec, to understand which one we are using)

Source from the content-addressed store, hash-verified

53
54/// Get method code (used for codec, to understand which one we are using)
55uint8_t getMethodCode(EncryptionMethod Method)
56{
57 if (Method == AES_128_GCM_SIV)
58 return static_cast<uint8_t>(CompressionMethodByte::AES_128_GCM_SIV);
59 if (Method == AES_256_GCM_SIV)
60 return static_cast<uint8_t>(CompressionMethodByte::AES_256_GCM_SIV);
61 throw Exception(ErrorCodes::BAD_ARGUMENTS, "Unknown encryption method. Got {}", getMethodName(Method));
62}
63
64} // end of namespace
65

Callers 2

registerEncryptionCodecFunction · 0.85
getMethodByteMethod · 0.85

Calls 2

getMethodNameFunction · 0.85
ExceptionClass · 0.70

Tested by

no test coverage detected