I need to send data via a url (it’s JSON’d) that I would like to encrypt using some method that I can then decrypt it using php. I was thinking base64, but I need a url safe base 64 (I’m using CI and CI removes +,= and /).
Is there anyway to duplicate
function url_base64_encode(&$str="")
{
return strtr(
base64_encode($str),
array(
'+' => '.',
'=' => '-',
'/' => '~'
)
);
}
in Javascript?
Or some other alternative?
jCryption maybe what you are looking for: http://www.jcryption.org/