c# - Securing client side json -


i new in windows store apps development. creating windows store app requires store data on client side. data present in json format having build action content. whenever user runs application, initializing objects reading json file. plain text , contains data should not revealed user. can encrypt json means. need workaround encrypt json data while building application , decrypt json while reading , initializing objects. please suggest.

i'm assuming code looks this:

string json = file.readalltext("/<path json>/config.json"); // parse json ... 

you can encrypt content of json file using aes encryption. need define key used encryption , decryption.

take in here : using aes encrypt / decrypt in c#


after using encryption code this:

when need read configuration:

string encryptedjson = file.readalltext("/<path json>/config.json"); string aeskey = "<your aes key>"; string plainjson = aesdecrypt(encryptedjson, aeskey); // parse json ... 

when need save configuration:

// generate json ... string plainjson;  string aeskey = "<your aes key>"; string encryptedjson = aesencrypt(plainjson, aeskey); file.writealltext("/<path json>/config.json", encryptedjson); 

note key can extracted compiled assemblies using reflection methods


Comments

Popular posts from this blog

c++ - How to add Crypto++ library to Qt project -

jQuery Mobile app not scrolling in Firefox -

How to use vim as editor in Matlab GUI -