diff options
author | lloyd <[email protected]> | 2008-11-10 04:25:52 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-11-10 04:25:52 +0000 |
commit | 91a7af626430335b64616df486f0fe49cd745660 (patch) | |
tree | 1978d31a248546a1f70b0707a24ab55e17a52aad /src/utils/scan_name.h | |
parent | 5bd2c0bdd8d805adaa081228932edbd6dd6c1708 (diff) |
Add a facility in SCAN_Name for provider names
Diffstat (limited to 'src/utils/scan_name.h')
-rw-r--r-- | src/utils/scan_name.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/utils/scan_name.h b/src/utils/scan_name.h index 61ee8a4f1..d311af2a8 100644 --- a/src/utils/scan_name.h +++ b/src/utils/scan_name.h @@ -9,6 +9,7 @@ SCAN Name Abstraction #include <botan/types.h> #include <string> #include <vector> +#include <set> namespace Botan { @@ -21,8 +22,10 @@ class SCAN_Name public: /** @param algo_spec A SCAN name + @param providers An optional list of providers (like "sse2,openssl,x86-64,core") */ - SCAN_Name(const std::string& algo_spec); + SCAN_Name(const std::string& algo_spec, + const std::string& providers = ""); /** @return the algorithm name @@ -35,6 +38,12 @@ class SCAN_Name u32bit arg_count() const { return name.size() - 1; } /** + @param provider a provider name + @returns if this provider was allowed by the request + */ + bool provider_allowed(const std::string& provider) const; + + /** @return if the number of arguments is between lower and upper */ bool arg_count_between(u32bit lower, u32bit upper) @@ -54,6 +63,7 @@ class SCAN_Name private: std::vector<std::string> name; + std::set<std::string> providers; }; } |