Package Data | |
---|---|
Maintainer Username: | sbamtr |
Maintainer Contact: | sbamtr@gmail.com (Siavash Bamshadnia) |
Package Create Date: | 2020-03-19 |
Package Last Update: | 2023-03-11 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-15 15:20:45 |
Package Statistics | |
---|---|
Total Downloads: | 31,643 |
Monthly Downloads: | 1,097 |
Daily Downloads: | 8 |
Total Stars: | 551 |
Total Watchers: | 19 |
Total Forks: | 127 |
Total Open Issues: | 21 |
Laravel and Lumen Source Code Encrypter
This package encrypts your php code with phpBolt
For Laravel and Lumen 5.5+, 6, 7
At the first, You have to install phpBolt.
Require the package with composer using the following command:
composer require --dev sbamtr/laravel-source-encrypter
The service provider will automatically get registered. Or you may manually add the service provider in your config/app.php
file:
'providers' => [
// ...
\sbamtr\LaravelSourceEncrypter\SourceEncryptServiceProvider::class,
];
Add this line of code under the Register Service Providers
section of your bootstrap/app.php
:
$app->register(\sbamtr\LaravelSourceEncrypter\SourceEncryptServiceProvider::class);
You can publish the config file with this following command:
php artisan vendor:publish --provider="sbamtr\LaravelSourceEncrypter\SourceEncryptServiceProvider" --tag=config
Note: If you are using Lumen, you have to use this package.
Open terminal in project root and run this command:
php artisan encrypt-source
This command encrypts files and directories in config/source-encrypter.php
file. Default values are app
, database
, routes
.
The default destination directory is encrypted
. You can change it in config/source-encrypter.php
file.
Also the default encryption key length is 6
. You can change it in config/source-encrypter.php
file. 6
is the recommended key length.
This command has these optional options:
| Option | Description | Example | |-------------|-----------------------|-------------------------| | source | Path(s) to encrypt | app,routes,public/a.php | | destination | Destination directory | encrypted | | keylength | Encryption key length | 6 |
| Command | Description |
|-------------------------------------------------------------|---------------------------------------------------------------------------------|
| php artisan encrypt-source
| Encrypts with default source, destination and keylength. |
| php artisan encrypt-source --source=app
| Encrypts app
directory to the default destination with default keylength. |
| php artisan encrypt-source --destination=dist
| Encrypts with default source and key length to dist
directory. |
| php artisan encrypt-source --destination=dist --keylength=8
| Encrypts default source to dist
directory and the encryption key length is 8
. |
Written with ♥ by Siavash Bamshadnia.
Please support me by staring this repository.