aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-10-01 15:35:01 +0000
committerlloyd <[email protected]>2008-10-01 15:35:01 +0000
commit909389b209d97ac3d7f83d76abef9cf943e7e9c7 (patch)
tree4cbb88cb974873b88ef2fd1ff7be0df4f8cddc4f /doc/examples
parentaaf7a6e172deab17dfffe442b896ccfc178b7318 (diff)
Line wrap
Diffstat (limited to 'doc/examples')
-rw-r--r--doc/examples/eax_test.cpp10
-rw-r--r--doc/examples/make_prime.cpp3
-rw-r--r--doc/examples/rng_test.cpp3
3 files changed, 11 insertions, 5 deletions
diff --git a/doc/examples/eax_test.cpp b/doc/examples/eax_test.cpp
index b69aec5e9..3a508ea83 100644
--- a/doc/examples/eax_test.cpp
+++ b/doc/examples/eax_test.cpp
@@ -48,7 +48,8 @@ void eax_test(const std::string& algo,
plaintext_str.c_str(), ciphertext.c_str());
*/
- //std::auto_ptr<RandomNumberGenerator> rng(RandomNumberGenerator::make_rng());
+ //std::auto_ptr<RandomNumberGenerator> rng(
+ xRandomNumberGenerator::make_rng());
SymmetricKey key(key_str);
InitializationVector iv(nonce_str);
@@ -74,7 +75,8 @@ void eax_test(const std::string& algo,
if(out != ciphertext + tag_str)
{
- printf("BAD enc %s '%s' != '%s%s'\n", algo.c_str(), out.c_str(), ciphertext.c_str(), tag_str.c_str());
+ printf("BAD enc %s '%s' != '%s%s'\n", algo.c_str(),
+ out.c_str(), ciphertext.c_str(), tag_str.c_str());
}
else
printf("OK enc %s\n", algo.c_str());
@@ -192,7 +194,9 @@ void run_tests(std::istream& in)
if(line.size() > 5 && line.substr(0, 4) == "EAX-")
{
- std::pair<std::string, int> name_and_keylen = translate_algo(line.substr(4));
+ std::pair<std::string, int> name_and_keylen =
+ translate_algo(line.substr(4));
+
algo = name_and_keylen.first;
key = seq(name_and_keylen.second);
}
diff --git a/doc/examples/make_prime.cpp b/doc/examples/make_prime.cpp
index ab84e1cdc..4d82907f9 100644
--- a/doc/examples/make_prime.cpp
+++ b/doc/examples/make_prime.cpp
@@ -50,7 +50,8 @@ int main()
if(not_new % 100000 == 0)
{
- for(std::map<int, int>::iterator i = bit_count.begin(); i != bit_count.end(); ++i)
+ for(std::map<int, int>::iterator i = bit_count.begin();
+ i != bit_count.end(); ++i)
std::cout << "bit_count[" << i->first << "] = "
<< i->second << "\n";
std::copy(primes.begin(), primes.end(),
diff --git a/doc/examples/rng_test.cpp b/doc/examples/rng_test.cpp
index 0cf7bd7fc..caefba6cd 100644
--- a/doc/examples/rng_test.cpp
+++ b/doc/examples/rng_test.cpp
@@ -109,7 +109,8 @@ int main()
}
-std::vector<std::pair<std::string, std::string> > read_file(const std::string& fsname)
+std::vector<std::pair<std::string, std::string> >
+read_file(const std::string& fsname)
{
std::ifstream in(fsname.c_str());