简体   繁体   English

C#MVC Web API 通过http将json纯文本转换为密文

[英]C# mvc web api. Convert json plain text to cipher text over http

I am developing a mobile backend application which is written in c# mvc web api's. 我正在开发一个用c#mvc web api编写的移动后端应用程序。 I would like to know the best secure mechanism to transmit json data. 我想知道传输JSON数据的最佳安全机制。 Is there any issue with sending data in json format, or should i convert that json to som encrypted format? 以json格式发送数据是否有任何问题,还是应该将该json转换为som加密格式? My actual data will look like this. 我的实际数据将如下所示。

{
"id":2130,
"location":"florida"
}

my question is, is there any way to convert this json to some other format which can be decrypted at mobile side say like as folllows 我的问题是,有什么办法可以将此json转换为其他格式,可以在移动端解密,如以下所示

{
"zxs#%df":"dfd5d2f",
"fgfd5f5gdd":"fdgfdg699"
}

or as a plain text like 或像

"dfsdfs^^dfsd^%$$fsdfsd*fs6556df$6"

which can be converted to actual json data 可以转换为实际的json数据

Use HTTPS. 使用HTTPS。

It is unlikely you can create our own protocol with comparable security. 您不太可能创建具有类似安全性的我们自己的协议。

Why don't you use tokenization and pass tokens? 为什么不使用令牌化并传递令牌?

you can refere and check with http://jwt.io/ 您可以通过http://jwt.io/进行参考和检查

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM