aboutsummaryrefslogtreecommitdiffstats
path: root/src/pk_core.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-04-12 03:08:18 +0000
committerlloyd <[email protected]>2008-04-12 03:08:18 +0000
commit66d92bc063a4cbb69e4242a15c3a90daa3db069e (patch)
treef48af6779692e324cbee3ee64cdf45c98a619f5f /src/pk_core.cpp
parent21669116db5ccb075d92a24af763f7b8c7a32976 (diff)
Remove Config::option_as_u32bit - the only advantage it had over calling
to_u32but on the return value from Config::option was that it passed it through parse_expr, which did some simple evaluation tricks so you could say 64*1024. That does not seem worth the cost in code, especially because most of the values so controlled are probably never changed. By making them compile time constants, additional optimizations are possible in the source as well as by the compiler. Remove the pkcs8_tries config option. Hardcode that value to 3 instead. I want to rewrite that code in the relatively near future and all that will (hopefully) go away.
Diffstat (limited to 'src/pk_core.cpp')
-rw-r--r--src/pk_core.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pk_core.cpp b/src/pk_core.cpp
index 14b55543e..09170ff37 100644
--- a/src/pk_core.cpp
+++ b/src/pk_core.cpp
@@ -7,6 +7,7 @@
#include <botan/numthry.h>
#include <botan/engine.h>
#include <botan/config.h>
+#include <botan/parsing.h>
#include <algorithm>
namespace Botan {
@@ -19,7 +20,7 @@ namespace {
BigInt blinding_factor(u32bit modulus_size)
{
const u32bit BLINDING_BITS =
- global_config().option_as_u32bit("pk/blinder_size");
+ to_u32bit(global_config().option("pk/blinder_size"));
if(BLINDING_BITS == 0)
return 0;