From 94c29976d0020b48a5c565234b71f8f6abaf08be Mon Sep 17 00:00:00 2001 From: Sebastian Holtermann Date: Wed, 10 Aug 2016 09:54:49 +0200 Subject: cmCryptoHash: Documentation comments --- Source/cmCryptoHash.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Source/cmCryptoHash.h b/Source/cmCryptoHash.h index 6aaaf93..84dea9b 100644 --- a/Source/cmCryptoHash.h +++ b/Source/cmCryptoHash.h @@ -16,12 +16,26 @@ #include +/** + * @brief Abstract base class for cryptographic hash generators + */ class cmCryptoHash { public: virtual ~cmCryptoHash() {} + /// @brief Returns a new hash generator of the requested type + /// @arg algo Hash type name. Supported hash types are + /// MD5, SHA1, SHA224, SHA256, SHA384, SHA512 + /// @return A valid auto pointer if algo is supported or + /// an invalid/NULL pointer otherwise static CM_AUTO_PTR New(const char* algo); + /// @brief Calculates a hash string from string input data + /// @return Sequence of hex characters pairs for each byte of the binary hash std::string HashString(const std::string& input); + /// @brief Calculates a hash string from file content + /// @see HashString() + /// @return Non empty hash string if the file was read successfully. + /// An empty string otherwise. std::string HashFile(const std::string& file); protected: -- cgit v0.12