手机
当前位置:查字典教程网 >编程开发 >C#教程 >C#最简单的字符串加密解密方法
C#最简单的字符串加密解密方法
摘要:publicstaticstringencode(stringstr){stringhtext="";for(inti=0;i

public static string encode(string str) { string htext = ""; for (int i = 0; i < str.Length; i++) { htext = htext + (char)(str[i] + 10 - 1 * 2); } return htext; } public static string decode(string str) { string dtext = ""; for (int i = 0; i < str.Length; i++) { dtext = dtext + (char)(str[i] - 10 + 1 * 2); } return dtext; }

【C#最简单的字符串加密解密方法】相关文章:

C#操作目录与文件的方法步骤

C# 获取属性名的方法

C#零基础学习理解委托

c#中分割字符串的几种方法

C#几种截取字符串的方法小结

C#中Web.Config加密与解密的方法

c#生成缩略图的实现方法

C#中将字符串转换为整型的三种解决方法总结

C#实现对AES加密和解密的方法

C# 打开电子邮件软件的具体方法

精品推荐
分类导航