本文介绍了简单的加密和解密的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我想通过 私有(对称)密钥对一段简单的文本进行读取和解密。 我试过在System.Cryptography类中搜索,但我不能找到一个简单的方法来完成这项工作。 有人可以给我一个简单的方法来解决这个问题。 在此先感谢 解决方案 有一种Microsoft方法可以做到这一点。然而你也可以天真地这样做,因为每个字符都可以用ascii数字表示, 你的文本行评估为一行数字,你可以在其上 松开一些算法来加扰它。 有一种Microsoft方法可以做到这一点。然而你也可以天真地这样做,因为每个字符都可以用ascii数字表示,你的文本行评估为一行数字,你可以在其中放宽一些算法争抢它。 否,*不*每个字符都可以用ascii编号表示。 ASCII 没有超过127的Unicode值,而有*加载*的Unicode 字符超过127 ... - Jon Skeet - < sk *** @ pobox.com> http://www.pobox.com/~skeet 如果回复群组,请不要给我发邮件 有一种Microsoft方法可以做到这一点。然而你也可以天真地这样做,因为每个字符都可以用ascii数字表示,你的文本行评估为一行数字,你可以在其中放宽一些算法争抢它。 不,*不*每个字符都可以用ascii编号表示。 ASCII 没有超过127的Unicode值,而有超过127的* 字符*加载* ... 亲爱的, OP正在谈论简单的文字行。 Hi,I would like to enrypt and decrypt a simple line of text, with aprivate(symmetric) key.I have tried searching in the System.Cryptography class, but I can''tfind 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 itnaively, since every character is representable by an ascii number,your line of text evaluates to a line of numbers, on which you canlet loose some algorithm to scramble it. 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. ASCIIhas no Unicode values over 127, whereas there are *loads* of Unicodecharacters over 127...--Jon Skeet - <sk***@pobox.com> http://www.pobox.com/~skeetIf replying to the group, please do not mail me too 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". 这篇关于简单的加密和解密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!