feat: xxbb

This commit is contained in:
hashbro
2026-08-13 06:30:07 +08:00
parent f285d35d86
commit c6e386e069
121 changed files with 4083 additions and 51 deletions
+11
View File
@@ -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));
}
}