PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
CREATE TABLE user_value (`user_name` varchar(4), `user_pass` varchar(3)) ;
Copy Clear
Copy Format Clear
<?php // The data to be encrypted $data = 'Pradyumn-Vishwakarma'; // The encryption key and initialization vector (IV) $key = 'secret'; $iv = random_bytes(16); // Generate a random IV // $iv =1; // Generate a random IV // Encrypt the data using AES-256-CBC $encrypted = openssl_encrypt($data, 'AES-256-CBC', $key, 0, $iv); echo $encrypted . "\n"; // Decrypt the data using AES-256-CBC $decrypted = openssl_decrypt($encrypted, 'AES-256-CBC', $key, 0, $iv); // Output the decrypted data echo $decrypted."\n"; // Output: Lorem ipsum dolor sit amet, consectetur adipiscing elit. print_r (explode("-",$decrypted)); ?>
Show:  
Copy Clear