Skip to content

Commit 14cf534

Browse files
committed
Updated tests to hopefully contain ciphers available to Scrutenizer
1 parent 5f50aa9 commit 14cf534

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

tests/unit/traits/DecryptAeadModeTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
namespace traits;
44

55

6-
use Encryption\Cipher\ARIA\Aria128ccm;
6+
use Encryption\Cipher\ID\Idaes128ccm;
77
use PHPUnit\Framework\TestCase;
88

99
class DecryptAeadModeTest extends TestCase
1010
{
1111
public function testDecrypt()
1212
{
13-
$encryptionObject = new Aria128ccm();
13+
$encryptionObject = new Idaes128ccm();
1414

15-
$iv = base64_decode('IrdR5KokpqpFyaKv');
16-
$tag = base64_decode('XpGvTrujY59NLOklwrYD2w==');
15+
$iv = base64_decode('rtfC7GSi74WuYDc2');
16+
$tag = base64_decode('guLJc6EUt/IvnqDkf+/Yzg==');
1717
$key = 'secretkey';
1818
$plainText = 'The quick brown fox jumps over the lazy dog';
19-
$encryptedText = '/OlLRKtZdjtn7nA+zcZ5bDtH8NPepAK1lISpSWRZZwNLPD9jDrHM6/vzp7e/NuSf';
19+
$encryptedText = 'Q+r+mRu1frKinwp3S/WTq9A73320FrX0zR3ZigSiFZETZe7odRphosL52k0xbt5b';
2020
$this->assertEquals($plainText, $encryptionObject->decrypt($encryptedText, $key, $iv, $tag));
2121
}
2222
}

tests/unit/traits/EncryptWithPaddingAeadModeTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
namespace traits;
44

55

6-
use Encryption\Cipher\ARIA\Aria128ccm;
6+
use Encryption\Cipher\ID\Idaes128ccm;
77
use PHPUnit\Framework\TestCase;
88

99
class EncryptWithPaddingAeadModeTest extends TestCase
1010
{
1111
public function testEncryptWithPadding()
1212
{
13-
$encryptionObject = new Aria128ccm();
13+
$encryptionObject = new Idaes128ccm();
1414

15-
$iv = base64_decode('IrdR5KokpqpFyaKv');
15+
$iv = base64_decode('rtfC7GSi74WuYDc2');
1616
$key = 'secretkey';
1717
$plainText = 'The quick brown fox jumps over the lazy dog';
18-
$encryptedText = '/OlLRKtZdjtn7nA+zcZ5bDtH8NPepAK1lISpSWRZZwNLPD9jDrHM6/vzp7e/NuSf';
18+
$encryptedText = 'Q+r+mRu1frKinwp3S/WTq9A73320FrX0zR3ZigSiFZETZe7odRphosL52k0xbt5b';
1919
$this->assertEquals($encryptedText, $encryptionObject->encrypt($plainText, $key, $iv, $tag));
2020
$this->assertNotEmpty($tag);
2121
}

0 commit comments

Comments
 (0)