aboutsummaryrefslogtreecommitdiffstats
path: root/src/algo_base/key_spec.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/algo_base/key_spec.h')
-rw-r--r--src/algo_base/key_spec.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/algo_base/key_spec.h b/src/algo_base/key_spec.h
index 73cd9126f..15881c1a6 100644
--- a/src/algo_base/key_spec.h
+++ b/src/algo_base/key_spec.h
@@ -79,6 +79,13 @@ class BOTAN_DLL Key_Length_Specification
return keylen_mod;
}
+ Key_Length_Specification multiple(size_t n) const
+ {
+ return Key_Length_Specification(n * min_keylen,
+ n * max_keylen,
+ n * keylen_mod);
+ }
+
private:
size_t min_keylen, max_keylen, keylen_mod;
};