28 return std::make_unique<MD5>();
30 return std::make_unique<SHA256>();
33 ss <<
"cannot create Hash '" << name <<
"': hash does not exist or is not registred.\n";
34 ss <<
"Registered hashes:\n";
36 ss <<
" " << hash <<
"\n";
47 #ifdef SERIALBOX_HAS_OPENSSL static std::string defaultHash()
Get the default hash algorithm (currently MD5 if avialable, SHA256 otherwise)
static const char * Name
Identifier of the hash.
static std::unique_ptr< Hash > create(const std::string &name)
Construct an instance of the Hash name
Namespace of the serialbox library.
static std::vector< std::string > registeredHashes()
Get a vector of strings of the registered hashes.
static const char * Name
Identifier of the hash.
Exception class which stores a human-readable error description.