如何创建加密和解密应用程序。 [英] How do I create a encryption and decryption application.

查看:123
本文介绍了如何创建加密和解密应用程序。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个应用程序,按下按钮时它会更改文本,例如代码项目获取更改为Riwe} Cdqmdfl然后您可以将其粘贴到文本框中然后更改回来。

Hi, I want to create an application that when a button is pressed it changes text for example "Code Project" Get's changed to "Riwe}Cdqmdfl" you can then paste it into a textbox it then changes back.

推荐答案

这不是加密,这是谁知道什么。所有加密都处理字节数组而不是其他内容。除非你解释你的场景,应用程序应该做什么,否则这个问题没有任何意义。只是像这样的应用程序没有任何意义。当您进行加密时,您应该设想这样的场景:它应该允许某些人访问数据并保护其他人。这些人有什么不同?



你需要先学习加密的想法:

http://en.wikipedia.org/wiki/Cryptography [ ^ ],

http:// en.wikipedia.org/wiki/Symmetric-key_algorithm [ ^ ],

http://en.wikipedia.org/wiki/Public- key_cryptography [ ^ ]。



我的意思是:理解这些想法是这里的主要部分。只有了解它,您才能真正理解您的需求。最简单的部分是使用实现。使用.NET FCL,您有一套很好的加密算法:

https://msdn.microsoft.com/en-us/library/system.security.cryptography.asymmetricalgorithm%28v=vs.110%29.aspx [ ^ ],

https://msdn.microsoft.com/en-us/library/system.security.cryptography.symmetricalgorithm%28v=vs.110%29.aspx [ ^ ],

...

HTTPS ://msdn.microsoft.com/en-us/library/System.Security.Cryptography%28v=vs.110%29.aspx [ ^ ],

< a href =https://msdn.microsoft.com/en-us/library/gg145025%28v=vs.110%29.aspx> https://msdn.microsoft.com/en-us/library/gg145025 %28v = vs.110%29.aspx [ ^ ]。



-SA
This is not "encryption", this is who knows what. All encryption deals with arrays of bytes and nothing else. The question makes no sense unless you explain your scenario, what the application should do. Just the application like that just unlikely makes any sense. When you do the encryption you should envision the scenario: it should allow access to data for some people and protect from some other people. How are those people different?

You need to learn the ideas of cryptography first:
http://en.wikipedia.org/wiki/Cryptography[^],
http://en.wikipedia.org/wiki/Symmetric-key_algorithm[^],
http://en.wikipedia.org/wiki/Public-key_cryptography[^].

I mean it: understanding the ideas is the main part here. Only when you understand it, you can really understand what you need. And the easiest part is using the implementation. With .NET FCL, you have a good set of cryptography algorithms:
https://msdn.microsoft.com/en-us/library/system.security.cryptography.asymmetricalgorithm%28v=vs.110%29.aspx[^],
https://msdn.microsoft.com/en-us/library/system.security.cryptography.symmetricalgorithm%28v=vs.110%29.aspx[^],

https://msdn.microsoft.com/en-us/library/System.Security.Cryptography%28v=vs.110%29.aspx[^],
https://msdn.microsoft.com/en-us/library/gg145025%28v=vs.110%29.aspx[^].

—SA


这篇关于如何创建加密和解密应用程序。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆