加密字符串 [英] Encrypt String

查看:77
本文介绍了加密字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何加密和解密字符串?

How can I encrypt and decrypt string?

推荐答案



" msnews.microsoft.com" <哒********* @ hotmail.com>在消息中写道

新闻:嗯************** @ TK2MSFTNGP10.phx.gbl ...

"msnews.microsoft.com" <da*********@hotmail.com> wrote in message
news:um**************@TK2MSFTNGP10.phx.gbl...
如何加密


与你的字符串长度相同的保护字符串,你需要加密


和解密串?



与完全相同的保护字符串异或
How can I encrypt
XOR it with a protection string of the same length of the string that you
are encrypting

and decrypt string?

XOR it with the exact same protection string




如果您不发布保护字符串,你加密的字符串在

牢不可破!


问候

roy罚款



if you do not publish the protection string, your encrypted string in
unbreakable!

regards
roy fine


你好
如果你没有发布保护字符串,你的加密字符串在
牢不可破!
if you do not publish the protection string, your encrypted string in
unbreakable!




XOR方法是易碎的,有人有一个加密的字符串和一个清晰的

文本字符串。

如果您对明文字符串和加密字符串进行异或,则会得到

保护字符串


最好的方法是使用.NET加密API中的加密方法

System.Security.Cryptography命名空间。

您可以使用DES,TripleDES,RC1或Rijndael算法进行对称

ecryption,

或RSA算法进行非对称加密
或SHA1或MD5用于散列。


对称加密有一个用于加密和解密的密钥。

非对称加密有一个公钥和一个私钥。公钥是

用于加密,只有他们的私钥才能解密数据。

使用Hashing,通常用于密码,没有密钥。并且

过程是不可逆的,除非密码太短,或者很容易猜到

(例如名字或词典单词)

您可以在MSDN文档中找到更多相关示例。


祝你好运,

谢里夫



The XOR method is breakable is someone has an encrypted string and a clear
text string.
If you XOR the clear text string and the encrypted string you get the
protection string

The best way is to use the encryption methods in .NET crypto API in
System.Security.Cryptography namespace.
You can use DES, TripleDES, RC1 or Rijndael algorithms for symmetric
ecryption,
or RSA algorithm for asymmetric encryption
or SHA1 or MD5 for hashing.

Symmetric encryption has one key that is used for encryption and decryption.
Asymetric encryption has a public key and a private key. The public key is
used for encryption, and only they private key can decrypt the data.
With Hashing, which commonly used for passwords, there is no key. and the
process is irreversible, unless the password is too short, or easy to guess
(a name or dictionary word for example)
You can find more with examples on this in MSDN documentation.

Best regards,
Sherif




" Sherif ElMetainy" < EL ************* @ wayout.net.NOSPAM>在消息中写道

新闻:uA ************** @ TK2MSFTNGP11.phx.gbl ...

"Sherif ElMetainy" <el*************@wayout.net.NOSPAM> wrote in message
news:uA**************@TK2MSFTNGP11.phx.gbl...
你好
如果你没有发布保护字符串,你的加密字符串就牢不可破!
XOR方法是易碎的,有人有一个加密的字符串和一个清晰的文本字符串。
如果您对明文字符串和加密字符串进行异或,则会获得
保护字符串
if you do not publish the protection string, your encrypted string in
unbreakable!
The XOR method is breakable is someone has an encrypted string and a clear
text string.
If you XOR the clear text string and the encrypted string you get the
protection string




以下是经过验证的事实 -

如果你没有发布保护字符串,你的加密字符串在
牢不可破!



The following is a proven fact --
if you do not publish the protection string, your encrypted string in
unbreakable!




其他方法是易碎的,但不是在有限的时间内!


roy罚款



other methods are breakable, but not in finite time!

roy fine


这篇关于加密字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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