aes-test - 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.



Your result can be seen below.

Result of php executing





Full code of aes-test.php

  1. <?php
  2.         $data = '10.00|0|TRY|$2y$10$HmRgYosneqcwHj.UH7upGuyCZqpQ1ITgSMj9Vvxn.t6f.Vdf2SQFO|ya020260062900011';
  3.         $key ='ng/sJ0wTFrfKMRbSkoxyJw91QOzOPIqi1bsEfyd8QSk=';
  4.         $vector = 'G0qWh4mLW2AixzqP';
  5.         $encryptedString = openssl_encrypt($data, 'aes-256-cbc', $key, null, $vector);
  6.         echo 'Encrypted: '.$encryptedString."\n\n\n";
  7.         $encryptedStringBase64 = base64_encode($encryptedString);
  8.         echo 'Encrypted + base 64:'.$encryptedStringBase64."\n\n\n";
  9.  
  10.         echo 'Decrypted:'.openssl_decrypt(base64_decode($encryptedStringBase64),'aes-256-cbc',  $key, null, $vector)."\n\n";
File Description
  • aes-test
  • PHP Code
  • 29 Jun-2021
  • 617 Bytes
You can Share it: