C# Base 64 编码/解码实现代码
程序员文章站
2023-02-22 19:38:51
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);
上一篇: 大脖子病不能吃什么
下一篇: 微信小程序实现商城倒计时