summaryrefslogtreecommitdiffstats
path: root/Source/cmCryptoHash.h
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2016-08-10 09:08:15 (GMT)
committerBrad King <brad.king@kitware.com>2016-08-10 17:21:32 (GMT)
commitf582dba6664e5ea814f3b33c71ae4d83db17b996 (patch)
treedcbf4b80dc825496733212ab8c23c06aa19555cf /Source/cmCryptoHash.h
parent74f0d4abcd8de84283858fe144772e688669e46a (diff)
downloadCMake-f582dba6664e5ea814f3b33c71ae4d83db17b996.zip
CMake-f582dba6664e5ea814f3b33c71ae4d83db17b996.tar.gz
CMake-f582dba6664e5ea814f3b33c71ae4d83db17b996.tar.bz2
cmCryptoHash: Return byte vector from internal Finalize method
Some callers may want the raw byte vector instead of the hex character string. Convert the internal implementation to use this so that we can later add public APIs to get it.
Diffstat (limited to 'Source/cmCryptoHash.h')
-rw-r--r--Source/cmCryptoHash.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmCryptoHash.h b/Source/cmCryptoHash.h
index 80ab269..ab50e82 100644
--- a/Source/cmCryptoHash.h
+++ b/Source/cmCryptoHash.h
@@ -48,7 +48,7 @@ public:
protected:
virtual void Initialize() = 0;
virtual void Append(unsigned char const*, int) = 0;
- virtual std::string Finalize() = 0;
+ virtual std::vector<unsigned char> Finalize() = 0;
};
class cmCryptoHashMD5 : public cmCryptoHash
@@ -62,7 +62,7 @@ public:
protected:
void Initialize() CM_OVERRIDE;
void Append(unsigned char const* buf, int sz) CM_OVERRIDE;
- std::string Finalize() CM_OVERRIDE;
+ std::vector<unsigned char> Finalize() CM_OVERRIDE;
};
#define cmCryptoHash_SHA_CLASS_DECL(SHA) \
@@ -77,7 +77,7 @@ protected:
protected: \
virtual void Initialize(); \
virtual void Append(unsigned char const* buf, int sz); \
- virtual std::string Finalize(); \
+ virtual std::vector<unsigned char> Finalize(); \
}
cmCryptoHash_SHA_CLASS_DECL(SHA1);