以上加密后有斜杠、百分号、等号。不要特殊符号,只要字母和数字结合

解决方案 »

  1.   

    那你就不能转成Base64 你转成BytToString 用下面的方法public static byte[] HexToBytes(string Hex)
    {
    int num = (int) Math.Round((double) (((double) Hex.Length) / 2));
    byte[] buffer = new byte[(num - 1) + 1];
    int num3 = num - 1;
    for (int i = 0; i <= num3; i++)
    {
    string s = Hex.Substring(i * 2, 2);
    buffer[i] = (byte) int.Parse(s, NumberStyles.HexNumber);
    }
    return buffer;
    }

    public static string BytesToHex(byte[] bytes)
    {
    StringBuilder builder = new StringBuilder();
    int num2 = bytes.Length - 1;
    for (int i = 0; i <= num2; i++)
    {
    builder.AppendFormat("{0:X2}", bytes[i]);
    }
    return builder.ToString();
    }