comparison UnitTestsSources/EncryptionTests.cpp @ 153:6dd8bb916573

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 21 Jun 2024 14:29:22 +0200
parents 3c7e0374f28e
children
comparison
equal deleted inserted replaced
152:d62f52be1943 153:6dd8bb916573
232 } 232 }
233 233
234 234
235 void MeasurePerformance(size_t sizeInMB, EncryptionHelpers& crypto) 235 void MeasurePerformance(size_t sizeInMB, EncryptionHelpers& crypto)
236 { 236 {
237 std::string largePlainText(sizeInMB * 1024 * 1024, 'A'); 237 std::string encryptedMessage;
238 std::string encryptedMessage; 238 std::string decryptedMessage;
239 std::string decryptedMessage; 239
240 240 {
241 { 241 const std::string largePlainText(sizeInMB * 1024 * 1024, 'A');
242
242 auto start = boost::posix_time::microsec_clock::local_time(); 243 auto start = boost::posix_time::microsec_clock::local_time();
243 crypto.Encrypt(encryptedMessage, largePlainText); 244 crypto.Encrypt(encryptedMessage, largePlainText);
244 245
245 auto end = boost::posix_time::microsec_clock::local_time(); 246 auto end = boost::posix_time::microsec_clock::local_time();
246 boost::posix_time::time_duration diff = end - start; 247 boost::posix_time::time_duration diff = end - start;