手机
当前位置:查字典教程网 >编程开发 >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#中Web.Config加密与解密的方法

C# mysql 插入数据,中文乱码的解决方法

C#连接Oracle数据库的实例方法

c#固定长度的随机字符串例子

C#数组学习相关资料整理

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

C#使用非托管代码直接修改字符串的方法

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

C# 获取属性名的方法

精品推荐
分类导航