| 66 | } |
| 67 | |
| 68 | static UInt256 calculateHash(std::string_view data [[maybe_unused]]) |
| 69 | { |
| 70 | #if USE_SSL |
| 71 | UInt256 hash; |
| 72 | encodeSHA256(data, reinterpret_cast<unsigned char *>(hash.items)); |
| 73 | return hash; |
| 74 | #else |
| 75 | throw Exception(ErrorCodes::SUPPORT_IS_DISABLED, "SHA256 hash support is disabled, because ClickHouse was built without SSL library"); |
| 76 | #endif |
| 77 | } |
| 78 | |
| 79 | static std::string hashToHex(const UInt256 & hash) |
| 80 | { |
no test coverage detected