Advertisement
Guest User

RIP

a guest
Mar 21st, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4.  
  5. <h2>JavaScript Bitwise AND</h2>
  6.  
  7. <p id="demo">My First Paragraph.</p>
  8.  
  9. <script>
  10. function hex2a(hexx) {
  11. var hex = hexx.toString();//force conversion
  12. var str = '';
  13. for (var i = 0; i < hex.length; i += 2)
  14. str += String.fromCharCode(parseInt(hex.substr(i, 2), 16));
  15. return str;
  16. }
  17.  
  18. function xor_encrypt() {
  19. $hexkey = hex2a('0A554B221E00482B02044F2503131A70531957685D555A2D121854250355026852115E2C17115E680C');
  20. $key = 'qw8Jqw8Jqw8Jqw8Jqw8Jqw8Jqw8Jqw8Jqw8Jqw8Jq'
  21. $text = '{"showpassword":"yes","bgcolor":"#ffffff"}';
  22. $outText = '';
  23.  
  24. // Iterate through each character
  25. for($i=0;$i<($text).length;$i++){
  26. $outText+=((($text[$i]).charCodeAt())^(($key[$i%($key).length]).charCodeAt()));
  27. $outText+= ',';
  28. }
  29.  
  30. return $outText;
  31. }
  32.  
  33. document.write(xor_encrypt());
  34. </script>
  35. </body>
  36. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement