inicio
This commit is contained in:
2025-05-05 11:03:01 -06:00
commit c73e3f2327
185 changed files with 17573 additions and 0 deletions

12
app/helpers/crypto.php Normal file
View File

@@ -0,0 +1,12 @@
<?php
function encrypt($data) {
$key = $_ENV['ENCRYPTION_KEY'];
$iv = $_ENV['ENCRYPTION_IV'];
return base64_encode(openssl_encrypt($data, 'AES-256-CBC', $key, OPENSSL_RAW_DATA, $iv));
}
function decrypt($data) {
$key = $_ENV['ENCRYPTION_KEY'];
$iv = $_ENV['ENCRYPTION_IV'];
return openssl_decrypt(base64_decode($data), 'AES-256-CBC', $key, OPENSSL_RAW_DATA, $iv);
}