Preciso usar o componente do laravel "Crypt" mas separado sem usar o framework, eu instalei ele via composer.
https://github.com/illuminate/encryption
include 'vendor/autoload.php';
use Illuminate\Encryption;
use Illuminate\Support\Facades\Crypt;
use Illuminate\Contracts\Encryption\DecryptException;
$encrypted = Crypt::encryptString('Hello world.');
$decrypted = Crypt::decryptString($encrypted);
Ele da um erro
Fatal error: Uncaught exception 'RuntimeException' with message 'A facade root has not been set.' in /var/www/html/exec/crypt/vendor/illuminate/support/Facades/Facade.php:218 Stack trace: #0 /var/www/html/exec/crypt/index.php(14): Illuminate\Support\Facades\Facade::__callStatic('encryptString', Array) #1 /var/www/html/exec/crypt/index.php(14): Illuminate\Support\Facades\Crypt::encryptString('Hello world.') #2 {main} thrown in /var/www/html/exec/crypt/vendor/illuminate/support/Facades/Facade.php on line 218