|
static | cfb8 (string $encryptionKey) |
|
static | fakeGCM (string $encryptionKey) |
|
Definition at line 34 of file EncryptionContext.php.
◆ __construct()
pocketmine\network\mcpe\encryption\EncryptionContext::__construct |
( |
string | $encryptionKey, |
|
|
string | $algorithm, |
|
|
string | $iv ) |
◆ cfb8()
static pocketmine\network\mcpe\encryption\EncryptionContext::cfb8 |
( |
string | $encryptionKey | ) |
|
|
static |
◆ decrypt()
pocketmine\network\mcpe\encryption\EncryptionContext::decrypt |
( |
string | $encrypted | ) |
|
◆ encrypt()
pocketmine\network\mcpe\encryption\EncryptionContext::encrypt |
( |
string | $payload | ) |
|
◆ fakeGCM()
static pocketmine\network\mcpe\encryption\EncryptionContext::fakeGCM |
( |
string | $encryptionKey | ) |
|
|
static |
Returns an EncryptionContext suitable for decrypting Minecraft packets from 1.16.220.50 (protocol version 429) and up.
MCPE uses GCM, but without the auth tag, which defeats the whole purpose of using GCM. GCM is just a wrapper around CTR which adds the auth tag, so CTR can replace GCM for this case. However, since GCM passes only the first 12 bytes of the IV followed by 0002, we must do the same for compatibility with MCPE. In PM, we could skip this and just use GCM directly (since we use OpenSSL), but this way is more portable, and better for developers who come digging in the PM code looking for answers.
Definition at line 67 of file EncryptionContext.php.
◆ $ENABLED
bool pocketmine\network\mcpe\encryption\EncryptionContext::$ENABLED = true |
|
static |
The documentation for this class was generated from the following file: