Encrypt (json) string in PHP and decode it in Xamarin PCL (Portable)

On my website I have a webservice in PHP that returns a JSON string. I want to Encrypt this string and then Decrypt it in Xamarin PCL (can be done with PCLCrypto). I have search on internet but i can't find anything. It must be done with the Xamarin Portable.

Please Help me!

Answers

  • seanydaseanyda GBMember ✭✭✭✭✭

    This is how you will deserialise a JSON string to a C# class.
    JsonConvert.DeserializeObject<RootObject>(string jsonString)

    What I would recommend doing is use this website http://json2csharp.com/ copy the JSON string into there and it'll give you the class (RootObject) you will need to deserialise the data into.

  • FaithFaithFaithFaith USMember ✭✭

    Hi Seanyda, serializing is allready working thanx. But i need to encrypt the data on my PHP server and then Descrypt it in de Xamarin Portable and THEN Deserialize. So I dont think you understand my question!

  • FaithFaithFaithFaith USMember ✭✭

    Really no one? FYI: The reason why i am doing this: I dont want to that other users, website users read the content.

Sign In or Register to comment.