aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/base/sym_algo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/base/sym_algo.h')
-rw-r--r--src/lib/base/sym_algo.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/base/sym_algo.h b/src/lib/base/sym_algo.h
index a596f5932..a0ebac626 100644
--- a/src/lib/base/sym_algo.h
+++ b/src/lib/base/sym_algo.h
@@ -91,6 +91,13 @@ class BOTAN_PUBLIC_API(2,0) SymmetricAlgorithm
*/
virtual std::string name() const = 0;
+ protected:
+ void verify_key_set(bool cond) const
+ {
+ if(cond == false)
+ throw Key_Not_Set(name());
+ }
+
private:
/**
* Run the key schedule