feat: xxbb
This commit is contained in:
@@ -48,4 +48,15 @@ class CorunaCryptoTest extends TestCase
|
||||
$this->assertSame($crypto->sessionKey().'0', $crypto->archivePassword('0'));
|
||||
$this->assertSame($crypto->sessionKey().'1722585600000', $crypto->archivePassword('1722585600000'));
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function xxbb_session_key_round_trip(): void
|
||||
{
|
||||
$crypto = new CorunaCrypto('Ek8pl31K2yeHgQwy');
|
||||
$this->assertSame('Ek8pl31K2yeHgQwy', $crypto->sessionKey());
|
||||
$payload = ['d' => '000C30D83CD0402E', 'et' => 'heartbeat'];
|
||||
$ts = '1786468227899';
|
||||
$enc = $crypto->encryptJson($payload, $ts);
|
||||
$this->assertSame($payload, $crypto->decryptJsonBody($enc['body'], $ts));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user