Add throw to test recover plain text for DefaultDecryptorWithMAC

pull/723/head
Jeffrey Walton 2018-09-08 17:08:44 -04:00
parent 4ff34ee329
commit ae34c2d2ff
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 2 additions and 0 deletions

View File

@ -438,6 +438,8 @@ bool TestEncryptors()
std::string recovered, message = "Now is the time for all good men to come to the aide of their country.";
//StringSource(message, true, new DefaultEncryptorWithMAC(password.c_str(), new FileSink("TestData/defdmac.bin")));
FileSource("TestData/defdmac.bin", true, new DefaultDecryptorWithMAC(password.c_str(), new StringSink(recovered)));
if (message != recovered)
throw Exception(Exception::OTHER_ERROR, "DefaultDecryptorWithMAC failed a self test");
}
catch(const Exception&)
{