AEAD-openssl - 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 AEAD-openssl.php
- <?php
- $key = '701241';
- $vector = chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0);
- $encryptedString = openssl_encrypt('AKIAQVSVNCI4VWN7GANM', 'aes-256-cbc', $key, OPENSSL_RAW_DATA, $vector);
- echo 'Encrypted: '.$encryptedString."\n";
- $encryptedStringBase64 = base64_encode($encryptedString);
- echo 'Encrypted + base 64:'.$encryptedStringBase64."\n";
- echo 'Decrypted:'.openssl_decrypt(base64_decode($encryptedStringBase64),'aes-256-cbc', $key, OPENSSL_RAW_DATA, $vector)."\n";
File Description
- AEAD-openssl
- PHP Code
- 02 Jun-2021
- 656 Bytes
You can Share it:
Latest PHP Pastes