What would be the best way to encode a json array into an alphanumeric string which can be used in a URL querystring?
I need something that is simple, yet not easy to crack. I've read through all the encrypt and decrypt documentation.
I need to encrypt a json array Eg: {"firstName":"John","lastName":"Doe"}
to something like a14iw58swd33s541dg2k58kv3s4gvkjsdf33s9f3
, so it can be used in a url query string like http://www.example.com/?v=a14iw58swd33s541dg2k58kv3s4gvkjsdf33s9f3
.
I'll later decrypt this server side. Since it part of a URL, I cannot have something like ȃZ Vì§n‹ØfjÒ šçæ¹ä¯
What would be an easy and safe way to do this?
base64_encode
to get an ASCII-only string.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With