密文,明文的转换 我想实现这样两个方法:public string 加密(string 明文,string 钥匙){.......}public string 解密(string 密文 string 钥匙){......}明文,密文之间的转化(跟据key)谢谢!!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 .net 的类库已经实现了MD5 , SHA1等直接调用就行了 string jmtxtpw="要加密码字符";char c1;for (int i=0;i<txtpw.Length;i++){ c1=System.Convert.ToChar(System.Convert.ToInt16(txtpw.Substring(i,1).ToCharArray()[0])+10); jmtxtpw=jmtxtpw+ System.Convert.ToString(c1);}char c1;for (int i=0;i<txtpw.Length;i++){ c1=System.Convert.ToChar(System.Convert.ToInt16(txtpw.Substring(i,1).ToCharArray()[0])-10); jmtxtpw=jmtxtpw+ System.Convert.ToString(c1);} http://blog.csdn.net/knight94/archive/2006/03/17/627040.aspx des和3des就可以不知道你想要对称加密还是非对称的 MD5,SHA1不叫加密,是摘要。对称加密用DES,不对称加密用RSA,都是比较成熟的加密法。网上资料应该很多的。 急等!请问论坛的帖子和帖子回复是怎么实现修改功能的? webBrowser无法读取不同域的iframe内的源代码,拒绝访问! c# winform DataGrid 怎么判断某列是否为空 操作文件遇到的郁闷问题,请大虾帮看看!! 能否介绍一本用C#的Socket开发客户端和服务器端比较经典的书 请教各位高手。。帮我看下这程序的问题 导入数据,超时! 我怎么设置不了ChildForm的StartPosition 方法传递参数的问题! wince项目中使用log4net写log日志 有没有谁用过winform下的html编辑器? 会自动提示的注释如何写?
直接调用就行了
char c1;
for (int i=0;i<txtpw.Length;i++)
{
c1=System.Convert.ToChar(System.Convert.ToInt16(txtpw.Substring(i,1).ToCharArray()[0])+10);
jmtxtpw=jmtxtpw+ System.Convert.ToString(c1);
}
char c1;
for (int i=0;i<txtpw.Length;i++)
{
c1=System.Convert.ToChar(System.Convert.ToInt16(txtpw.Substring(i,1).ToCharArray()[0])-10);
jmtxtpw=jmtxtpw+ System.Convert.ToString(c1);
}
不知道你想要对称加密还是非对称的
对称加密用DES,不对称加密用RSA,都是比较成熟的加密法。网上资料应该很多的。