Serialbox  2.2.0
Data serialization library and tools for C/C++, Python and Fortran
serialbox::HashFactory Class Reference

Factory to create Hash algorithms. More...

#include <HashFactory.h>

Static Public Member Functions

static std::unique_ptr< Hashcreate (const std::string &name)
 Construct an instance of the Hash name More...
 
static std::vector< std::string > registeredHashes ()
 Get a vector of strings of the registered hashes.
 
static std::string defaultHash ()
 Get the default hash algorithm (currently MD5 if avialable, SHA256 otherwise)
 

Detailed Description

Factory to create Hash algorithms.

Definition at line 27 of file HashFactory.h.

Member Function Documentation

◆ create()

std::unique_ptr< Hash > serialbox::HashFactory::create ( const std::string &  name)
static

Construct an instance of the Hash name

Parameters
nameName of the Hash (as given by Hash::name())
Returns
Pointer to the newly constructed Hash with the requested dynamic-type
Exceptions
ExceptionNo Hash with given name exists or is registered

Definition at line 26 of file HashFactory.cpp.


The documentation for this class was generated from the following files: