79629454

Date: 2025-05-19 20:51:06
Score: 1.5
Natty:
Report link

$secret_key = "This is my SeCrEt key";

$method = "AES-256-CBC";

$iv_length = openssl_cipher_iv_length($method);

$iv = openssl_random_pseudo_bytes($iv_length);

$data = "page=homepage";

$encrypted = openssl_encrypt($data, $method, $secret_key, OPENSSL_RAW_DATA, $iv);

// Guardar IV + datos cifrados juntos

$final_output = base64_encode($iv . $encrypted);

$final_output = urlencode($final_output); // Para usar en un link

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Daniel Saldivar