aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/eax_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'doc/examples/eax_test.cpp')
-rw-r--r--doc/examples/eax_test.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/examples/eax_test.cpp b/doc/examples/eax_test.cpp
index 3f7dbcbc8..32311800d 100644
--- a/doc/examples/eax_test.cpp
+++ b/doc/examples/eax_test.cpp
@@ -14,7 +14,9 @@
using namespace Botan;
-unsigned to_string(const std::string& s)
+namespace {
+
+unsigned from_string(const std::string& s)
{
std::istringstream stream(s);
unsigned n;
@@ -211,7 +213,7 @@ void run_tests(std::istream& in)
if(boost::regex_match(line, what, vec_regex, boost::match_extra))
{
- unsigned n = to_string(what[1]);
+ unsigned n = from_string(what[1]);
std::string ciphertext = what[2];
std::string tag = what[3];
@@ -230,6 +232,8 @@ void run_tests(std::istream& in)
}
+}
+
int main()
{
std::ifstream in("eax_tv.txt");