| Recommend this page to a friend! |
| Info | Example | Reputation | Support forum | Blog | Links |
| Ratings | Unique User Downloads | Download Rankings | ||||
| Not yet rated by the users | Total: 212 | All time: 8,347 This week: 571 | ||||
| Version | License | PHP version | Categories | |||
| php-encryption-class 1.0.0 | MIT/X Consortium ... | 5 | PHP 5, Cryptography |
| Description | Author | |||||||||||||||||||||||
This package can encrypt and decrypt data using adapter classes. |
| |||||||||||||||||||||||
<?php |
Encryption in PHP.
Installing this package is very simple, first ensure you have the right PHP version and composer installed then in your terminal/(command prompt) run:
## Encrypt
You can encrypt string by calling to encrypt method
<?php use Lablnet\Encryption; require '../vendor/autoload.php';
$encryption = new Encryption();
//Encrypt the message $encrypt = $encryption->encrypt("This is a text");
echo $encrypt;
### Decrypt
You can decrypt token by calling decrypt method
<?php use Lablnet\Encryption; require '../vendor/autoload.php';
$encryption = new Encryption();
//Decrypt the message $decrypt = $encryption->decrypt($encrypt); echo $decrypt;
### Adapter
This Package support two encryption adapter
- OpenSSL
- Sodium
Default openSSL will use,
you can use any one you want.
### change Adapter
You can pass supported adapter to class like
Use of sodium
<?php use Lablnet\Encryption; require '../vendor/autoload.php';
$encryption = new Encryption('sodium');
Use of openSSL
<?php use Lablnet\Encryption; require '../vendor/autoload.php';
$encryption = new Encryption('openssl');
//You can also provide your own key for openSSL $encryption1 = new Encryption('openssl','my-key');
| File | Role | Description | ||
|---|---|---|---|---|
| Data | Auxiliary data | |||
| Lic. | License text | |||
| Doc. | Read me | |||
| / | src | / | Adapter |
| File | Role | Description |
|---|---|---|
| |
Class | Class source |
| |
Class | Class source |
| |
Class | Class source |
| The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
| php-encryption-class-2019-02-05.zip 5KB | |
| php-encryption-class-2019-02-05.tar.gz 3KB | |
| Install with Composer |
| Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
| 100% |
|
|
| Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.