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

C# Base 64 編碼/解碼實現(xiàn)代碼

 更新時間:2016年02月29日 23:13:06   投稿:mdxy-dxy  
這篇文章主要介紹了C# Base 64 編碼/解碼實現(xiàn)代碼,需要的朋友可以參考下

1、base64 to string

   string strPath = "aHR0cDovLzIwMy44MS4yOS40Njo1NTU3L1
 9iYWlkdS9yaW5ncy9taWRpLzIwMDA3MzgwLTE2Lm1pZA==";     
   byte[] bpath = Convert.FromBase64String(strPath);
   strPath = System.Text.ASCIIEncoding.Default.GetString(bpath);

2、string to base64

System.Text.Encoding encode = System.Text.Encoding.ASCII ;
byte[] bytedata = encode.GetBytes( "test");
string strPath = Convert.ToBase64String(bytedata,0,bytedata.Length);

相關(guān)文章

最新評論