/// <summary>
  ///  md5加密字符串
  /// </summary>
  /// <param name="source">源字符串</param>
  /// <param name="key">密钥</param>
  /// <returns>加密后的字符串</returns>
  public static string Encode(string source, string key)
  {
   MD5 md5 = new MD5CryptoServiceProvider();

   ASCIIEncoding code = new ASCIIEncoding();
   string str = source + key.ToLower();
   byte[] bit = code.GetBytes(str);

   str = Convert.ToBase64String(bit);
   bit = code.GetBytes(str);
   bit = md5.ComputeHash(bit);
   str = Convert.ToBase64String(bit);

   return str;
  }