C# Base 64 编码/解码实现代码
程序员文章站
2022-05-25 23:20:58
1、base64 to string
string strpath = "ahr0cdovlziwmy44ms4yos40njo1ntu3l1
9iyw...
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);
上一篇: scala akka actor —— Hello World
下一篇: 凡事往好的方面想想