aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/rsa_enc.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-07-07 18:27:45 +0000
committerlloyd <[email protected]>2010-07-07 18:27:45 +0000
commit61734fa2696ff73c213d8e801a786e538258df8e (patch)
tree387e96c4d56e094bcc75df77d61d3315d42b9afa /doc/examples/rsa_enc.cpp
parented7fca61ada917361c481d1119a670cf48292d57 (diff)
Read and save the files in binary mode to avoid weird EOF problems
on Windows.
Diffstat (limited to 'doc/examples/rsa_enc.cpp')
-rw-r--r--doc/examples/rsa_enc.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/examples/rsa_enc.cpp b/doc/examples/rsa_enc.cpp
index 6cf555e70..b21b60a5d 100644
--- a/doc/examples/rsa_enc.cpp
+++ b/doc/examples/rsa_enc.cpp
@@ -47,7 +47,7 @@ int main(int argc, char* argv[])
return 1;
}
- std::ifstream message(argv[2]);
+ std::ifstream message(argv[2], std::ios::binary);
if(!message)
{
std::cout << "Couldn't read the message file." << std::endl;