aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/block/block_cipher.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/block/block_cipher.h')
-rw-r--r--src/lib/block/block_cipher.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/lib/block/block_cipher.h b/src/lib/block/block_cipher.h
index 08bf18fd3..0f4c2c1c5 100644
--- a/src/lib/block/block_cipher.h
+++ b/src/lib/block/block_cipher.h
@@ -22,6 +22,19 @@ class BOTAN_DLL BlockCipher : public SymmetricAlgorithm
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 provider is empty then best available is chosen.
+ */
+ static std::unique_ptr<BlockCipher> 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 block size of this algorithm
*/
virtual size_t block_size() const = 0;
@@ -141,6 +154,8 @@ class BOTAN_DLL BlockCipher : public SymmetricAlgorithm
* @return new object representing the same algorithm as *this
*/
virtual BlockCipher* clone() const = 0;
+
+ virtual ~BlockCipher();
};
/**