ExampleEncry - 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 ExampleEncry.php
- <?php
- # I am by no means a cryptographer. So this might be reversible, but I would be really impressed if you can email me back the password I used.
- # Some Variables
- $key = 'Warzone1'; #Input::get('asdasda'); <- this is stateless as it’s just one request. So not stored anywhere. Can decrypt all passwords on the page we are on. Can use same statelessness when updating all passwords.
- $databasePassword = "VPbnJtMg/70xZRdf/0bpHg=="; # <- This is what you would get from our database could do more but this is just an example.
- #Set up
- $bytes = "";
- $last = "";
- while(strlen($bytes) < 48) {
- $last = md5($last . $key, true);
- $bytes.= $last;
- }
- $iv = substr($bytes, 32, 16);
- $encryptionMethod = 'AES-128-CBC';
- # Just for lulz how i generated it.
- #$databasePassword = openssl_encrypt('Hi Adam!', $encryptionMethod, $key, 0, $iv);
- #echo $databasePassword . '<br/>';
- var_dump(openssl_decrypt($databasePassword, $encryptionMethod, $key, 0, $iv));
File Description
- ExampleEncry
- PHP Code
- 25 Mar-2021
- 961 Bytes
You can Share it:
Latest PHP Pastes