ClickHouse/src/Common/OpenSSLHelpers.h

26 lines
625 B
C++
Raw Normal View History

2019-05-26 06:52:29 +00:00
#pragma once
#if !defined(ARCADIA_BUILD)
# include <Common/config.h>
#endif
#if USE_SSL
2020-09-15 09:55:57 +00:00
# include <common/types.h>
2019-05-26 06:52:29 +00:00
namespace DB
{
/// Encodes `text` and returns it.
std::string encodeSHA256(const std::string_view & text);
std::string encodeSHA256(const void * text, size_t size);
/// `out` must be at least 32 bytes long.
void encodeSHA256(const std::string_view & text, unsigned char * out);
void encodeSHA256(const void * text, size_t size, unsigned char * out);
2019-05-26 06:52:29 +00:00
2019-05-26 19:30:23 +00:00
/// Returns concatenation of error strings for all errors that OpenSSL has recorded, emptying the error queue.
2019-05-26 06:52:29 +00:00
String getOpenSSLErrors();
}
2019-09-11 11:21:54 +00:00
#endif