diff options
Diffstat (limited to 'src/lib/hash/hash.h')
-rw-r--r-- | src/lib/hash/hash.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/lib/hash/hash.h b/src/lib/hash/hash.h index 8406a4c0f..76c9d5cd7 100644 --- a/src/lib/hash/hash.h +++ b/src/lib/hash/hash.h @@ -23,10 +23,25 @@ class BOTAN_DLL HashFunction : public Buffered_Computation typedef SCAN_Name Spec; /** + * Create an instance based on a name + * Will return a null pointer if the algo/provider combination cannot + * be found. If providers is empty then best available is chosen. + */ + static std::unique_ptr<HashFunction> create(const std::string& algo_spec, + const std::string& provider = ""); + + /** + * Returns the list of available providers for this algorithm, empty if not available + */ + static std::vector<std::string> providers(const std::string& algo_spec); + + /** * @return new object representing the same algorithm as *this */ virtual HashFunction* clone() const = 0; + HashFunction(); + virtual ~HashFunction(); virtual void clear() = 0; |