ClickHouse/src/Functions/tryDecrypt.cpp
Robert Schulze da5a2e2db0
Merge remote-tracking branch 'origin/master' into generated-file-cleanup
Physical merge conflicts:
- src/Common/ZooKeeper/ZooKeeperImpl.cpp
- src/Core/config_core.h.in
- src/Functions/FunctionsAES.h
- src/Functions/config_functions.h.in
- src/configure_config.cmake

Logical merge conflicts:
- Functions/tryDecrypt.cpp
2022-10-06 08:43:25 +00:00

33 lines
637 B
C++

#include <Common/Documentation.h>
#include "config.h"
#if USE_SSL
# include <Functions/FunctionFactory.h>
# include <Functions/FunctionsAES.h>
namespace
{
struct TryDecryptImpl
{
static constexpr auto name = "tryDecrypt";
static constexpr auto compatibility_mode = OpenSSLDetails::CompatibilityMode::OpenSSL;
static constexpr bool use_null_when_decrypt_fail = true;
};
}
namespace DB
{
REGISTER_FUNCTION(TryDecrypt)
{
factory.registerFunction<FunctionDecrypt<TryDecryptImpl>>(Documentation(
"Similar to `decrypt`, but returns NULL if decryption fails because of using the wrong key."));
}
}
#endif