ronakiihglobal / stringcrypto
encrypt decrypt id/string with ease
Installs: 11
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/ronakiihglobal/stringcrypto
This package is not auto-updated.
Last update: 2025-10-20 05:53:49 UTC
README
This is simple package for encrypt/decrypt small strings like database IDs with ease. It is based on openssl_encrypt.
The encrypt method used is AES-256-CBC
.
Usage
composer require ronakiihglobal/stringcrypto
then
require_once __DIR__ . '/vendor/autoload.php';
use ronakiihglobal\stringcrypto\Crypto;
$crypto = new Crypto("testkey","testIv");
these values should be random string of length 16 and should be managed as secret in env variables.
$encrypted = $crypto::encrypt("123");
this value should be string.
$decrypted = $crypto::decrypt($encrypted);