figdice / symcrypt
Simple symmetric cryptography
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 3
pkg:composer/figdice/symcrypt
Requires (Dev)
- phpunit/phpunit: ^5.0
This package is not auto-updated.
Last update: 2025-09-27 23:15:56 UTC
README
Provides an easy and secure way to encrypt/decrypt data with PHP using the Symmetric Cryptography method, a low cost algorithm that works based on the shared keys conecpt.
<?php
require_once 'Crypt/Crypt.php';
$crypt = new Crypt();
$crypt->Mode = Crypt::MODE_HEX;
$crypt->Key = '!@#$%&*()_+?:';
$encrypted = $crypt->encrypt('my test');
echo $crypt->decrypt($encrypted);
?>