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
Post a Comment