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

Function calculateHash

src/Interpreters/WasmModuleManager.cpp:68–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68static 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
79static std::string hashToHex(const UInt256 & hash)
80{

Callers 6

getHashMethod · 0.85
nextImplMethod · 0.85
nextImplMethod · 0.85
saveModuleMethod · 0.85
getModuleMethod · 0.85

Calls 2

encodeSHA256Function · 0.85
ExceptionClass · 0.70

Tested by

no test coverage detected