Changeset 5ffe8ce in comparacioncriptosistemas
- Timestamp:
- Jan 14, 2016, 5:29:51 PM (8 years ago)
- Branches:
- master, interfaz
- Children:
- 0e18918
- Parents:
- fafd156
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
rsa/main.cpp
rfafd156 r5ffe8ce 63 63 messageFile.append(".txt"); 64 64 65 std::string s; 66 CryptoPP::FileSource file( qPrintable(messageFile), true, new StringSink( s ) ); 65 66 //CryptoPP::FileSource file( qPrintable(messageFile), true, new StringSink( s ) ); 67 QFile readFile(messageFile); 68 assert (readFile.open(QFile::ReadOnly | QFile::Text)); 69 QTextStream in(&readFile); 70 71 std::string text = in.readAll().toStdString(); 67 72 68 73 //std::cout << s ;//<< std::endl; … … 101 106 RSA::PublicKey publicKey(params); 102 107 103 SecByteBlock plaintext( (const unsigned char *) s.data(), s.size() );108 SecByteBlock plaintext( (const unsigned char *) text.data(), text.size() ); 104 109 105 110
Note: See TracChangeset
for help on using the changeset viewer.