Commit 47f91a61 authored by Brad King's avatar Brad King

cmCryptoHash: Avoid using subclasses at client sites

Use only the main `cmCryptoHash` interface.
parent d0ff3e70
Pipeline #34582 passed with stage
......@@ -847,8 +847,8 @@ bool cmSystemTools::RenameFile(const char* oldname, const char* newname)
bool cmSystemTools::ComputeFileMD5(const std::string& source, char* md5out)
{
#if defined(CMAKE_BUILD_WITH_CMAKE)
cmCryptoHashMD5 md5;
std::string str = md5.HashFile(source);
CM_AUTO_PTR<cmCryptoHash> md5 = cmCryptoHash::New("MD5");
std::string str = md5->HashFile(source);
strncpy(md5out, str.c_str(), 32);
return !str.empty();
#else
......@@ -863,8 +863,8 @@ bool cmSystemTools::ComputeFileMD5(const std::string& source, char* md5out)
std::string cmSystemTools::ComputeStringMD5(const std::string& input)
{
#if defined(CMAKE_BUILD_WITH_CMAKE)
cmCryptoHashMD5 md5;
return md5.HashString(input);
CM_AUTO_PTR<cmCryptoHash> md5 = cmCryptoHash::New("MD5");
return md5->HashString(input);
#else
(void)input;
cmSystemTools::Message("md5sum not supported in bootstrapping mode",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment