diff options
author | Brad King <brad.king@kitware.com> | 2011-11-16 15:12:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2011-11-16 15:29:35 (GMT) |
commit | 2e9c26cf9616fead92ec65eefc696bcf9761b996 (patch) | |
tree | 35460a3ee2bde7485174fe3adefa4fca19e0ac68 /Source/cmStringCommand.h | |
parent | 293a7f4e2ae9b458d3efefcfe133d0ad5320a1b2 (diff) | |
download | CMake-2e9c26cf9616fead92ec65eefc696bcf9761b996.zip CMake-2e9c26cf9616fead92ec65eefc696bcf9761b996.tar.gz CMake-2e9c26cf9616fead92ec65eefc696bcf9761b996.tar.bz2 |
Add string(MD5) and string(SHA*) commands to compute hashes
Provide a CMake-language binding to these cryptographic hashes. Add a
string() command API for MD5, SHA1, SHA224, SHA256, SHA384, and SHA512.
Diffstat (limited to 'Source/cmStringCommand.h')
-rw-r--r-- | Source/cmStringCommand.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmStringCommand.h b/Source/cmStringCommand.h index 52b83d9..452f4a1 100644 --- a/Source/cmStringCommand.h +++ b/Source/cmStringCommand.h @@ -76,6 +76,8 @@ public: " string(REPLACE <match_string>\n" " <replace_string> <output variable>\n" " <input> [<input>...])\n" + " string(<MD5|SHA1|SHA224|SHA256|SHA384|SHA512>\n" + " <output variable> <input>)\n" " string(COMPARE EQUAL <string1> <string2> <output variable>)\n" " string(COMPARE NOTEQUAL <string1> <string2> <output variable>)\n" " string(COMPARE LESS <string1> <string2> <output variable>)\n" @@ -103,6 +105,8 @@ public: "backslash through argument parsing.\n" "REPLACE will replace all occurrences of match_string in the input with " "replace_string and store the result in the output.\n" + "MD5, SHA1, SHA224, SHA256, SHA384, and SHA512 " + "will compute a cryptographic hash of the input string.\n" "COMPARE EQUAL/NOTEQUAL/LESS/GREATER will compare the strings and " "store true or false in the output variable.\n" "ASCII will convert all numbers into corresponding ASCII characters.\n" @@ -150,6 +154,7 @@ protected: bool RegexMatch(std::vector<std::string> const& args); bool RegexMatchAll(std::vector<std::string> const& args); bool RegexReplace(std::vector<std::string> const& args); + bool HandleHashCommand(std::vector<std::string> const& args); bool HandleToUpperLowerCommand(std::vector<std::string> const& args, bool toUpper); bool HandleCompareCommand(std::vector<std::string> const& args); |