From 141b85873731db10060677e1135b8c04a1dc8613 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 27 Sep 2013 16:25:35 -0400 Subject: Self-test fixes for new packet armor/dearmor functions that combine old encrypt and MAC functions. --- selftest.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/selftest.cpp b/selftest.cpp index c45c261a..7789290c 100644 --- a/selftest.cpp +++ b/selftest.cpp @@ -321,18 +321,9 @@ static int testPacket() return -1; } - a.compress(); - a.encrypt(salsaKey); - a.decrypt(salsaKey); - a.uncompress(); - if (a != b) { - std::cout << "FAIL (encrypt-decrypt)" << std::endl; - return -1; - } - - a.macSet(hmacKey); - if (!a.macVerify(hmacKey)) { - std::cout << "FAIL (macVerify)" << std::endl; + a.armor(salsaKey,true); + if (!a.dearmor(salsaKey)) { + std::cout << "FAIL (encrypt-decrypt/verify)" << std::endl; return -1; } -- cgit v1.2.3