aboutsummaryrefslogtreecommitdiffstats
path: root/src/math/numbertheory
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-02-25 23:07:38 +0000
committerlloyd <[email protected]>2010-02-25 23:07:38 +0000
commit5fec937bd0c72858d6cf2f09b58b219294c7d5cc (patch)
tree811714c0663199782b07b8f20a328eeeeff9e768 /src/math/numbertheory
parent08647db8877585a783797c8db22dc76233b200f0 (diff)
parent3e95540b28f3d828c4578381c318545f6ad49589 (diff)
propagate from branch 'net.randombit.botan' (head c1db52e38b60afbc6549af5222d6e10b1b9730dd)
to branch 'net.randombit.botan.c++0x' (head e56dfbfe6bffbd5b4e52b115549d885c5fd04586)
Diffstat (limited to 'src/math/numbertheory')
-rw-r--r--src/math/numbertheory/dsa_gen.cpp8
-rw-r--r--src/math/numbertheory/make_prm.cpp4
-rw-r--r--src/math/numbertheory/numthry.cpp2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/math/numbertheory/dsa_gen.cpp b/src/math/numbertheory/dsa_gen.cpp
index 83646e50e..39a7cf5fa 100644
--- a/src/math/numbertheory/dsa_gen.cpp
+++ b/src/math/numbertheory/dsa_gen.cpp
@@ -47,15 +47,15 @@ bool generate_dsa_primes(RandomNumberGenerator& rng,
if(!fips186_3_valid_size(pbits, qbits))
throw Invalid_Argument(
"FIPS 186-3 does not allow DSA domain parameters of " +
- to_string(pbits) + "/" + to_string(qbits) + " bits long");
+ std::to_string(pbits) + "/" + std::to_string(qbits) + " bits long");
if(seed_c.size() * 8 < qbits)
throw Invalid_Argument(
- "Generating a DSA parameter set with a " + to_string(qbits) +
+ "Generating a DSA parameter set with a " + std::to_string(qbits) +
"long q requires a seed at least as many bits long");
- std::auto_ptr<HashFunction> hash(
- af.make_hash_function("SHA-" + to_string(qbits)));
+ std::unique_ptr<HashFunction> hash(
+ af.make_hash_function("SHA-" + std::to_string(qbits)));
const u32bit HASH_SIZE = hash->OUTPUT_LENGTH;
diff --git a/src/math/numbertheory/make_prm.cpp b/src/math/numbertheory/make_prm.cpp
index b136b6d25..3eb01cd42 100644
--- a/src/math/numbertheory/make_prm.cpp
+++ b/src/math/numbertheory/make_prm.cpp
@@ -20,7 +20,7 @@ BigInt random_prime(RandomNumberGenerator& rng,
{
if(bits <= 1)
throw Invalid_Argument("random_prime: Can't make a prime of " +
- to_string(bits) + " bits");
+ std::to_string(bits) + " bits");
else if(bits == 2)
return ((rng.next_byte() % 2) ? 2 : 3);
else if(bits == 3)
@@ -85,7 +85,7 @@ BigInt random_safe_prime(RandomNumberGenerator& rng, u32bit bits)
{
if(bits <= 64)
throw Invalid_Argument("random_safe_prime: Can't make a prime of " +
- to_string(bits) + " bits");
+ std::to_string(bits) + " bits");
BigInt p;
do
diff --git a/src/math/numbertheory/numthry.cpp b/src/math/numbertheory/numthry.cpp
index e4c52323e..f79fdec2b 100644
--- a/src/math/numbertheory/numthry.cpp
+++ b/src/math/numbertheory/numthry.cpp
@@ -77,7 +77,7 @@ u32bit miller_rabin_test_iterations(u32bit bits, bool verify)
{
struct mapping { u32bit bits; u32bit verify_iter; u32bit check_iter; };
- static const mapping tests[] = {
+ const mapping tests[] = {
{ 50, 55, 25 },
{ 100, 38, 22 },
{ 160, 32, 18 },