src/Encrypter.php
public function encrypt($data): string
    {
        $packed = json_encode($data);

        try {
            return base64_encode(Crypto::Encrypt($packed, $this->key));
        } catch (\Throwable $e) {
            throw new EncryptException($e->getMessage(), $e->getCode(), $e);
        }
    }
public function encrypt($data): string
    {
        $packed = json_encode($data);

        try {
            return base64_encode(Crypto::Encrypt($packed, $this->key));
        } catch (\Throwable $e) {
            throw new EncryptException($e->getMessage(), $e->getCode(), $e);
        }
    }
{@inheritdoc}

Data encoded using json_encode method, only supported formats are allowed!