diff options
author | lloyd <[email protected]> | 2010-11-29 22:52:17 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-11-29 22:52:17 +0000 |
commit | 0e41e0e8d441ff907f092c718db650cda06e2e1a (patch) | |
tree | 8c0df20500bdf601d4378a6000923501a48ad1f3 /src/pubkey | |
parent | 5d4621b745ac529c7df6c4d91e4d2b68bd0325e4 (diff) | |
parent | 65ab36776317f73ddf0f2d3bd6c1c7e35608962f (diff) |
propagate from branch 'net.randombit.botan' (head fc8daa606ab7954eab48778d7236986747b719e4)
to branch 'net.randombit.botan.c++0x' (head 2bf71b0a2e0e468d7eb3631e4ca284234f554729)
Diffstat (limited to 'src/pubkey')
-rw-r--r-- | src/pubkey/workfactor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pubkey/workfactor.cpp b/src/pubkey/workfactor.cpp index a4d670c82..f3d5d164a 100644 --- a/src/pubkey/workfactor.cpp +++ b/src/pubkey/workfactor.cpp @@ -34,14 +34,14 @@ size_t dl_work_factor(size_t bits) return 190; return 256; #else - const size_t MIN_ESTIMATE = 64; + const double MIN_ESTIMATE = 64; const double log_x = bits / 1.44; const double strength = 2.76 * std::pow(log_x, 1.0/3.0) * std::pow(std::log(log_x), 2.0/3.0); - return std::max<size_t>(strength, MIN_ESTIMATE); + return static_cast<size_t>(std::max(strength, MIN_ESTIMATE)); #endif } |