c# - How to encrypt data from server side and pass it to client side(javascript) and decrypt and use it -
I have a Jason string on the server side in the MSc and I access that Jason string on the client side just by rendering it Html (plain).
There are some important values in this Jason String that not all should be shared.
I have been thought about encrypting and decrypting, but the decrypting value on the client side that is encrypted on I server side. I find this a little weird.
With whom do you want to protect? If you do not want external parties to read the information broadcast on the Internet, then you should use a TLS / HTTPS connection. If you do not want a legitimate user to access Jason's data then you are mostly out of luck.
Encryption can help you with this problem, but ultimately you can make the data obscure for a while, but eventually make it difficult. The encryption key is not about the security of the data against anyone, if you have access to a key in some way in your JavaScript code, then the user can also remove it, for example seeing the JavaScript source or viewing the values of the variables used By using the debugger.
Comments
Post a Comment