pentagonal / simple_encrypt
Simple Encryption utility
1.0.0
2017-08-21 14:59 UTC
Requires
- php: >=5.4.0
Requires (Dev)
- phpunit/phpunit: 4.5.*
This package is not auto-updated.
Last update: 2025-01-19 02:34:22 UTC
README
Another Small Encryption Helper
Encrypt string or another type of value to encryption.
by default encryption use openssl
with default AES-256-CBC
and another encryption using alternative of str_rot13
and encoded by base64_encode
Encryption
/** * Using default encryption mcrypt */ Pentagonal\SimpleEncryption\Encryption::encrypt('string to encrypt', 'saltkey'); /** * Using alternative type */ Pentagonal\SimpleEncryption\Encryption::altEncrypt('string to encrypt', 'saltkey');
Decryption
/** * Decrypt encrypted string with auto detect encryption use */ Pentagonal\SimpleEncryption\Encryption::decrypt('string to decrypt', 'saltkey'); // or can use Pentagonal\SimpleEncryption\Encryption::altDecrypt('string to decrypt', 'saltkey');
Install Using Composer
Composer is handy tool for adding library easily from packagist and another resource to your application. Get Install on here : https://getcomposer.org and install on your OS.
{ "require": { "pentagonal/simple_encrypt" : "~1.0" } }
Or directly install via terminal
composer require pentagonal/simple_encrypt
Requirements
This library require php 5.4.0 or later. Suggest to enable openssl
on your php configuration.
License
MIT License https://opensource.org/licenses/MIT