Przeglądaj źródła

Self-test fixes for new packet armor/dearmor functions that combine old encrypt and MAC functions.

Adam Ierymenko 12 lat temu
rodzic
commit
141b858737
1 zmienionych plików z 3 dodań i 12 usunięć
  1. 3 12
      selftest.cpp

+ 3 - 12
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;
 	}