aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/kdf/kdf.h
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2015-09-21 16:09:36 -0400
committerJack Lloyd <[email protected]>2015-09-21 16:09:36 -0400
commit7ebe7511496b8a6950acced513a81516565354ed (patch)
treeadd1163c2afbd1ae3d163aaac8375a3b56bd6c9c /src/lib/kdf/kdf.h
parent8f732dccce692eaca509fc9732702df62cfa5c87 (diff)
parent04319af23bf8ed467b17f9b74c814343e051ab6b (diff)
Merge pull request #279 from randombit/fix-static-lib-registration
Move the algorithm factory functions to T::create and move object registration to the source file for its base class. These resolve the issues which prevented successful use of a static library that was built with individual object files. Removes the restriction in configure.py which prevented building non-amalgamation static libs.
Diffstat (limited to 'src/lib/kdf/kdf.h')
-rw-r--r--src/lib/kdf/kdf.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/lib/kdf/kdf.h b/src/lib/kdf/kdf.h
index d69c1ece5..88b50c8b8 100644
--- a/src/lib/kdf/kdf.h
+++ b/src/lib/kdf/kdf.h
@@ -21,7 +21,20 @@ namespace Botan {
class BOTAN_DLL KDF
{
public:
- virtual ~KDF() {}
+ virtual ~KDF();
+
+ /**
+ * Create an instance based on a name
+ * Will return a null pointer if the algo/provider combination cannot
+ * be found. If provider is empty then best available is chosen.
+ */
+ static std::unique_ptr<KDF> 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);
virtual std::string name() const = 0;