qwerty123 - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of qwerty123.php
- <?php
- $key = "8b362e210615e66b3bf7f69f6c819056";
- $cipher = "aes-256-ctr";
- $iv = "ABCDEFGHIJKLMNOP";
- $ciphertext = "N/+kToQPGwnGWxrtaiemNBQ1xZ4uns6yUkWRWn86b86RufsKteruCBa2B6PeONx1fa/KTBYDVxmqf617zYK0P9WKNAOsYg==";
- function decrypt($ciphertext, $key, $cipher, $iv) {
- if (in_array($cipher, openssl_get_cipher_methods())) {
- $ivlen = openssl_cipher_iv_length($cipher);
- $plaintext = openssl_decrypt($ciphertext, $cipher, $key, $options = 0, $iv);
- if ($plaintext) {
- return $plaintext;
- } else {
- echo "Decryption error";
- }
- }
- }
- $decryptedValue = decrypt($ciphertext, $key, $cipher, $iv);
- echo "Valor desencriptado: " . $decryptedValue;