我有一个从流传输过来的Base64 byte[]数组,我需要把它转换成一个普通的byte[],该怎么做呢?
发布于 2011-07-18 21:47:00
您必须使用Convert.FromBase64String将Base64编码的string转换为byte[]。
发布于 2015-01-23 14:16:28
这可能会有所帮助。
byte[] bytes = System.Convert.FromBase64String(stringInBase64);发布于 2011-07-18 22:00:33
试一试
byte[] incomingByteArray = receive...; // This is your Base64-encoded bute[]
byte[] decodedByteArray =Convert.FromBase64String (Encoding.ASCII.GetString (incomingByteArray));
// This work because all Base64-encoding is done with pure ASCII charactershttps://stackoverflow.com/questions/6733845
复制相似问题