How to encrypt/decrypt javascript array, while using php -


i creating javascript array dynamically using php instance take 1 example here

<?php  echo "<script>            var array={                         'a' : {                                  'a':123 ,                                 'b':[[1,2],[3,4]]                              }                      };   function dum(arr)     {                       window.alert(arr);     }  dum(array['a']['a']);  </script>";   ?> 

in case array created holds important information not want share of client, since impossible mask view source in browser understood previous post, encrypt before echo in view source client won't able understand array is, array contains, , sending array function in case dum, inside function dum descrypt it, , process.

i hope approach clear, negative voters kindly comment understand mistake.

while encrypt data before sending client, if want you'll have send client instructions on how decrypt it, make content available user.

if don't want user have access data, decent option never send data browser in first place.

keep on server. process on server. associate user using session.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

c# - Unity IoC Lifetime per HttpRequest for UserStore -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -