简单的加密和解密 [英] Simple Encryption and Decryption
问题描述
我想通过
私有(对称)密钥对一段简单的文本进行读取和解密。
我试过在System.Cryptography类中搜索,但我不能找到一个简单的方法来完成这项工作。
有人可以给我一个简单的方法来解决这个问题。
在此先感谢
" Xarky" <是********* @ yahoo.com>在消息中写道
新闻:bc ************************* @ posting.google.co m ... < blockquote class =post_quotes>
我想用一个简单的文本行来解密和解密,用一个
私有(对称)密钥。
我试过搜索在System.Cryptography课程中,我不能找到一种简单的方法来完成这项工作。
有人可以给我一个简单的方法来解决这个问题。
提前致谢
有一种Microsoft方法可以做到这一点。然而你也可以天真地这样做,因为每个字符都可以用ascii数字表示,
你的文本行评估为一行数字,你可以在其上
松开一些算法来加扰它。
Zach< wa ********** @ all.here>写道:" Xarky" <是********* @ yahoo.com>在消息中写道
新闻:bc ************************* @ posting.google.co m ...
我想用一个简单的文本行,用一个
私有(对称)密钥来解密和解密。
我试过在系统中搜索。密码学课程,但我不能找到一种简单的方法来完成这项工作。
有人可以给我一个简单的方法来做这件事。
先谢谢
有一种Microsoft方法可以做到这一点。然而你也可以天真地这样做,因为每个字符都可以用ascii数字表示,
你的文本行评估为一行数字,你可以在其中放宽一些算法争抢它。
否,*不*每个字符都可以用ascii编号表示。 ASCII
没有超过127的Unicode值,而有*加载*的Unicode
字符超过127 ...
-
Jon Skeet - < sk *** @ pobox.com>
http://www.pobox.com/~skeet
如果回复群组,请不要给我发邮件
" Jon Skeet [C#MVP]" < SK *** @ pobox.com>在消息中写道
新闻:MP ************************ @ msnews.microsoft.c om ...Zach< wa ********** @ all.here>写道:" Xarky" <是********* @ yahoo.com>在消息中写道
新闻:bc ************************* @ posting.google.co m ...
我想用一个简单的文本行,用一个
私有(对称)密钥来解密和解密。
我试过在系统中搜索。密码学课程,但我不能找到一种简单的方法来完成这项工作。
有人可以给我一个简单的方法来做这件事。
先谢谢
有一种Microsoft方法可以做到这一点。然而你也可以天真地这样做,因为每个字符都可以用ascii数字表示,
你的文本行评估为一行数字,你可以在其中放宽一些算法争抢它。
不,*不*每个字符都可以用ascii编号表示。 ASCII
没有超过127的Unicode值,而有超过127的*
字符*加载* ...
亲爱的, OP正在谈论简单的文字行。
Hi,
I would like to enrypt and decrypt a simple line of text, with a
private(symmetric) key.
I have tried searching in the System.Cryptography class, but I can''t
find a simple way of doing this job.
Can someone recommend me an easy way on how to do it.
Thanks in Advance
"Xarky" <be*********@yahoo.com> wrote in message
news:bc*************************@posting.google.co m...Hi,
I would like to enrypt and decrypt a simple line of text, with a
private(symmetric) key.
I have tried searching in the System.Cryptography class, but I can''t
find a simple way of doing this job.
Can someone recommend me an easy way on how to do it.
Thanks in Advance
There is a Microsoft way to do this. However you can also do it
naively, since every character is representable by an ascii number,
your line of text evaluates to a line of numbers, on which you can
let loose some algorithm to scramble it.
Zach <wa**********@all.here> wrote:"Xarky" <be*********@yahoo.com> wrote in message
news:bc*************************@posting.google.co m...Hi,
I would like to enrypt and decrypt a simple line of text, with a
private(symmetric) key.
I have tried searching in the System.Cryptography class, but I can''t
find a simple way of doing this job.
Can someone recommend me an easy way on how to do it.
Thanks in Advance
There is a Microsoft way to do this. However you can also do it
naively, since every character is representable by an ascii number,
your line of text evaluates to a line of numbers, on which you can
let loose some algorithm to scramble it.
No, *not* every character is representable by an ascii number. ASCII
has no Unicode values over 127, whereas there are *loads* of Unicode
characters over 127...
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...Zach <wa**********@all.here> wrote:"Xarky" <be*********@yahoo.com> wrote in message
news:bc*************************@posting.google.co m...Hi,
I would like to enrypt and decrypt a simple line of text, with a
private(symmetric) key.
I have tried searching in the System.Cryptography class, but I can''t
find a simple way of doing this job.
Can someone recommend me an easy way on how to do it.
Thanks in Advance
There is a Microsoft way to do this. However you can also do it
naively, since every character is representable by an ascii number,
your line of text evaluates to a line of numbers, on which you can
let loose some algorithm to scramble it.
No, *not* every character is representable by an ascii number. ASCII
has no Unicode values over 127, whereas there are *loads* of Unicode
characters over 127...
Oh dear, the OP is talking about "a simple line of text".
这篇关于简单的加密和解密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!