���� JFIF �� � ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /var/www/html/vidoe.top/lib/cryptojs-aes/example/ |
<?php error_reporting(E_ALL);?> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>CryptoJS AES and PHP</title> <script type="text/javascript" src="aes.js"></script> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="../aes-json-format.js"></script> <script type="text/javascript"> $(document).ready(function(){ $(".decrypt").on("click", function(){ $(this).prev().val(JSON.parse(CryptoJS.AES.decrypt($(".encrypted").val(), $(document.e).find(".pass").val(), {format: CryptoJSAesJson}).toString(CryptoJS.enc.Utf8))); }); }); </script> </head> <body> <h1>CryptoJS AES and PHP</h1> <h2>Example to encrypt with PHP on serverside side and decrypt on client side</h2> <form name="e" method="post" action=""> Value to encrypt: <input type="text" name="val" value="<?php echo isset($_POST["val"]) ? $_POST["val"] : "My string - Could also be an JS array/object"?>" class="val" size="45"/><br/> Passphrase: <input type="text" name="pass" class="pass" value="<?php echo isset($_POST["pass"]) ? $_POST["pass"] : "my secret passphrase"?>" size="45"/><br/> <input type="submit" name="encrypt" value="Send to server and encrypt, than decrypt with cryptoJS"/> <?php if(isset($_POST["encrypt"])){ include("../cryptojs-aes.php"); ?> <hr/> <br/><br/> Encrypted value generated by PHP: <input type="text" value="<?php echo htmlentities(cryptoJsAesEncrypt($_POST["pass"], $_POST["val"]))?>" size="90" disabled="disabled" class="encrypted"/><br/> Decrypted value: <input type="text" value="" size="90" disabled="disabled"/> <input class="decrypt" type="button" value="Decrypt now with cryptoJS"/> <?php } ?> </form> </body> </html>