diff options
-rw-r--r-- | doc/examples/rsa_dec.cpp | 2 | ||||
-rw-r--r-- | doc/examples/rsa_enc.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/doc/examples/rsa_dec.cpp b/doc/examples/rsa_dec.cpp index 8353b0449..81592328c 100644 --- a/doc/examples/rsa_dec.cpp +++ b/doc/examples/rsa_dec.cpp @@ -60,7 +60,7 @@ int main(int argc, char* argv[]) std::string outfile(argv[2]); outfile = outfile.replace(outfile.find(SUFFIX), SUFFIX.length(), ""); - std::ofstream plaintext(outfile.c_str()); + std::ofstream plaintext(outfile.c_str(), std::ios::binary); if(!plaintext) { std::cout << "Couldn't write the plaintext to " 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; |