Recommend this page to a friend! |
Classes of Muhammad Umer Farooq | PHP Encryption Library | readme.md | Download |
|
DownloadPHP EncryptionEncryption in PHP. Requirement
InsallationInstalling this package is very simple, first ensure you have the right PHP version and composer installed then in your terminal/(command prompt) run:
<?php use Lablnet\Encryption; require '../vendor/autoload.php'; $encryption = new Encryption(); //Encrypt the message $encrypt = $encryption->encrypt("This is a text"); echo $encrypt;
<?php use Lablnet\Encryption; require '../vendor/autoload.php'; $encryption = new Encryption(); //Decrypt the message $decrypt = $encryption->decrypt($encrypt); echo $decrypt;
<?php use Lablnet\Encryption; require '../vendor/autoload.php'; $encryption = new Encryption('sodium');
<?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');
|