欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

C#最簡(jiǎn)單的字符串加密解密方法

 更新時(shí)間:2015年05月08日 09:48:36   投稿:junjie  
這篇文章主要介紹了C#最簡(jiǎn)單的字符串加密解密方法,本文直接給出實(shí)例代碼,需要的朋友可以參考下
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;
    }

相關(guān)文章

最新評(píng)論