Add -> add project

This commit is contained in:
2026-03-27 14:09:52 +03:30
commit 3327207f05
14 changed files with 403 additions and 0 deletions

15
app/core/security.php Normal file
View File

@@ -0,0 +1,15 @@
<?php
function encryptText($text, $key) {
$iv = random_bytes(16);
$cipher = openssl_encrypt($text, 'AES-256-CBC', $key, 0, $iv);
return [
'cipher' => $cipher,
'iv' => base64_encode($iv)
];
}
function decryptText($cipher, $iv, $key) {
return openssl_decrypt($cipher, 'AES-256-CBC', $key, 0, base64_decode($iv));
}
function generateId() {
return bin2hex(random_bytes(16));
}