Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
Signed-off-by: Nguyen Van Nguyen <[email protected]>
  • Loading branch information
nguyennv committed Dec 20, 2024
1 parent eefd854 commit 147e302
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/Packet/AEPDTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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)])
Expand Down

0 comments on commit 147e302

Please sign in to comment.