public function onLoginStartPacket(LoginStartPacket $packet)
    {
        //set the users name as supplied in the packet
        $this->username = $packet->getUsername();

        //create a new encryption request
        $request = new EncryptionRequestPacket();

        //set our randomly generated server ID and verifyToken for this connection
        $this->serverID = $request->getRandomServerID();
        $this->verifyToken = $request->getRandomServerID();

        //the public key needs to not have the start and end lines on it
        $publicKey = $this->certificate->getPublicKey()->getPublicKey();
        $publicKey = substr($publicKey, 28, -26);

        //set the request data
        $request->setPublicKey($publicKey)
            ->setServerID($this->serverID)
            ->setToken($this->verifyToken);

        //send the packet to the client
        $this->sendPacket($request);
    }