diff options
author | Brad King <brad.king@kitware.com> | 2016-11-03 15:30:09 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-11-10 13:29:37 (GMT) |
commit | 47f91a6183a6bb65a423d5acb1b75c4b39c17a87 (patch) | |
tree | 4c38c78f01b87256efc853b4c4b1a3d1772c334c | |
parent | d0ff3e701c63caab5a44c48ac70e3ab75af9ee88 (diff) | |
download | CMake-47f91a6183a6bb65a423d5acb1b75c4b39c17a87.zip CMake-47f91a6183a6bb65a423d5acb1b75c4b39c17a87.tar.gz CMake-47f91a6183a6bb65a423d5acb1b75c4b39c17a87.tar.bz2 |
cmCryptoHash: Avoid using subclasses at client sites
Use only the main `cmCryptoHash` interface.
-rw-r--r-- | Source/cmSystemTools.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 0a3a1ab..27fecdf 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -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", |