cmCryptoHash: Provide factory "New" method

Construct a cmCryptoHash subclass instance based on the name of the
desired hash algorithm.
This commit is contained in:
Brad King
2011-11-16 10:04:41 -05:00
parent 46ab0561fc
commit 293a7f4e2a
3 changed files with 23 additions and 13 deletions

View File

@@ -14,9 +14,12 @@
#include "cmStandardIncludes.h"
#include <cmsys/auto_ptr.hxx>
class cmCryptoHash
{
public:
static cmsys::auto_ptr<cmCryptoHash> New(const char* algo);
std::string HashString(const char* input);
std::string HashFile(const char* file);
protected: