• 关于String 和 Base64 之间的互转 比较简单!


      public static String EncryptBase64Code(String text)
            
    {
                Byte[] bufin 
    = System.Text.ASCIIEncoding.UTF8.GetBytes(text);
                String result 
    = Convert.ToBase64String(bufin, 0, bufin.Length);
                
    return result;
            }


            
    public static String DecryptBase64Code(String text)
            
    {
                
    try
                
    {
                    Byte[] bufout 
    = Convert.FromBase64String(text);
                    String result 
    = System.Text.ASCIIEncoding.UTF8.GetString(bufout);
                
    return result;
                }

                
    catch
                
    {
                    
    return text;
                }

            }
     
  • 相关阅读:
    Android Zygote介绍
    Android binder介绍(下)
    Android binder介绍(上)
    Android init介绍(下)
    Android init介绍(上)
    Android 网络服务介绍
    Linux代理服务器使用
    Linux ALSA介绍
    ZigBee MAC层(下)
    ZigBee MAC层(上)
  • 原文地址:https://www.cnblogs.com/SUNBOY/p/526037.html
Copyright © 2020-2023  润新知