pentagonal / simple_encrypt
Simple Encryption utility
Installs: 538
Dependents: 1
Suggesters: 0
Security: 0
Stars: 12
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/pentagonal/simple_encrypt
Requires
- php: >=5.4.0
Requires (Dev)
- phpunit/phpunit: 4.5.*
This package is not auto-updated.
Last update: 2025-10-12 05:58:55 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