From 147e302ee1ff692280b01af3605df0ddcc816183 Mon Sep 17 00:00:00 2001 From: Nguyen Van Nguyen Date: Fri, 20 Dec 2024 14:54:41 +0700 Subject: [PATCH] WIP Signed-off-by: Nguyen Van Nguyen --- tests/Packet/AEPDTest.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/Packet/AEPDTest.php b/tests/Packet/AEPDTest.php index 45ec6f0..f1f087c 100644 --- a/tests/Packet/AEPDTest.php +++ b/tests/Packet/AEPDTest.php @@ -25,7 +25,7 @@ public function testAeadEaxDecrypt() ); $aepd = AeadEncryptedData::fromBytes($bytes); - $this->assertEquals($aepd->getSymmetric(), SymmetricAlgorithm::Aes256); + $this->assertEquals($aepd->getSymmetric(), SymmetricAlgorithm::Aes128); $this->assertEquals($aepd->getAead(), AeadAlgorithm::Eax); $this->assertSame($aepd->getChunkSize(), 14); $this->assertSame($aepd->getIV(), $iv); @@ -44,7 +44,7 @@ public function testAeadOcbDecrypt() ); $aepd = AeadEncryptedData::fromBytes($bytes); - $this->assertEquals($aepd->getSymmetric(), SymmetricAlgorithm::Aes256); + $this->assertEquals($aepd->getSymmetric(), SymmetricAlgorithm::Aes128); $this->assertEquals($aepd->getAead(), AeadAlgorithm::Ocb); $this->assertSame($aepd->getChunkSize(), 14); $this->assertSame($aepd->getIV(), $iv); @@ -56,7 +56,9 @@ public function testAeadOcbDecrypt() public function testAeadEncrypt() { - $sessionKey = SessionKey::produceKey(); + $sessionKey = SessionKey::produceKey( + SymmetricAlgorithm::Aes256 + ); $aepd = AeadEncryptedData::encryptPacketsWithSessionKey( $sessionKey, new PacketList([LiteralData::fromText(self::LITERAL_TEXT)])