dy1 - 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 dy1.php
- <?php
- $plaintext = json_encode(array('<foo>',"'bar'",'"baz"','&blong&', "\xc3\xa9"),JSON_UNESCAPED_UNICODE);
- $key = 'testable';
- $vector = 'Provider';
- $encryptedString = openssl_encrypt($plaintext, 'des-cbc', $key, OPENSSL_RAW_DATA, 'Provider');
- echo 'Encrypted: '.$encryptedString."\n";
- echo ''.$plaintext."\n";
- $encryptedStringBase64 = base64_encode($encryptedString);
- echo 'Encrypted + base 64:'.$encryptedStringBase64."\n";
- echo 'Decrypted:'.openssl_decrypt(base64_decode($encryptedStringBase64),'des-cbc', $key, OPENSSL_RAW_DATA, $vector)."\n";
- echo 'Decrypted:'.openssl_decrypt(base64_decode('YK66cZbAK/0='),'des-cbc', $key, OPENSSL_RAW_DATA, $vector)."\n";
File Description
- dy1
- PHP Code
- 22 Jan-2022
- 762 Bytes
You can Share it:
Latest PHP Pastes