| 195 | #if USE_SSL |
| 196 | |
| 197 | std::string ConfigProcessor::encryptValue(const std::string & codec_name, const std::string & value) |
| 198 | { |
| 199 | EncryptionMethod encryption_method = toEncryptionMethod(codec_name); |
| 200 | CompressionCodecEncrypted codec(encryption_method); |
| 201 | |
| 202 | Memory<> memory; |
| 203 | memory.resize(codec.getCompressedReserveSize(static_cast<UInt32>(value.size()))); |
| 204 | auto bytes_written = codec.compress(value.data(), static_cast<UInt32>(value.size()), memory.data()); |
| 205 | std::string encrypted_value(memory.data(), bytes_written); |
| 206 | std::string hex_value; |
| 207 | /// NOLINTNEXTLINE(clang-analyzer-core.StackAddressEscape) |
| 208 | boost::algorithm::hex(encrypted_value.begin(), encrypted_value.end(), std::back_inserter(hex_value)); |
| 209 | return hex_value; |
| 210 | } |
| 211 | |
| 212 | std::string ConfigProcessor::decryptValue(const std::string & codec_name, const std::string & value) |
| 213 | { |
nothing calls this directly
no test coverage detected