手机
当前位置:查字典教程网 >编程开发 >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#零基础学习理解委托

C# 屏蔽关键字的实现方法

C#连接db2数据库的实现方法

C#删除文件目录或文件的解决方法

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

精品推荐
分类导航