diff options
Diffstat (limited to 'lib/algo_base/algo_base.h')
-rw-r--r-- | lib/algo_base/algo_base.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/lib/algo_base/algo_base.h b/lib/algo_base/algo_base.h new file mode 100644 index 000000000..f757a9a83 --- /dev/null +++ b/lib/algo_base/algo_base.h @@ -0,0 +1,41 @@ +/* +* Algorithm Base Class +* (C) 2010 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ + +#ifndef BOTAN_ALGO_BASE_CLASS_H__ +#define BOTAN_ALGO_BASE_CLASS_H__ + +#include <botan/build.h> +#include <string> + +namespace Botan { + +/** +* This class represents an algorithm of some kind +*/ +class BOTAN_DLL Algorithm + { + public: + /** + * Zeroize internal state + */ + virtual void clear() = 0; + + /** + * @return name of this algorithm + */ + virtual std::string name() const = 0; + + Algorithm() {} + Algorithm(const Algorithm&) = delete; + Algorithm& operator=(const Algorithm&) = delete; + + virtual ~Algorithm() {} + }; + +} + +#endif |