| Path : /var/www/html/work123/ |
| Current File : /var/www/html/work123/security.php |
<?php
define('ENCRYPTION_KEY', 'my_secret_key_12345'); // แก้ไขเป็นคีย์ของคุณ
define('ENCRYPTION_IV', '1234567890123456');
function encrypt_password($password) {
return openssl_encrypt($password, "AES-256-CBC", ENCRYPTION_KEY, 0, ENCRYPTION_IV);
}
function decrypt_password($encrypted_password) {
return openssl_decrypt($encrypted_password, "AES-256-CBC", ENCRYPTION_KEY, 0, ENCRYPTION_IV);
}
?>