EncryptionContext: Allow passing encryption algo as a constructor parameter

This commit is contained in:
Dylan K. Taylor
2021-06-13 19:57:48 +01:00
parent cc00b3e19b
commit 0df2677464
2 changed files with 6 additions and 6 deletions

View File

@@ -670,7 +670,7 @@ class NetworkSession{
}
$this->sendDataPacket(ServerToClientHandshakePacket::create($handshakeJwt), true); //make sure this gets sent before encryption is enabled
$this->cipher = new EncryptionContext($encryptionKey);
$this->cipher = new EncryptionContext($encryptionKey, EncryptionContext::ENCRYPTION_SCHEME);
$this->setHandler(new HandshakePacketHandler(function() : void{
$this->onServerLoginSuccess();