Example #1
0
        private static byte[] UuDecodeData(string data)
        {
            byte[]       dataBytes    = Encoding.ASCII.GetBytes(data);
            MemoryStream inputStream  = new MemoryStream(dataBytes);
            MemoryStream outputStream = new MemoryStream();

            Codecs.UUDecode(inputStream, outputStream);
            byte[] decodedDataBytes = outputStream.ToArray();
            return(decodedDataBytes);
        }
Example #2
0
        private byte[] GetUUDecodeData(string data)
        {
            try
            {
                byte[]       dataBytes    = Encoding.ASCII.GetBytes(data);
                MemoryStream inputStream  = new MemoryStream(dataBytes);
                MemoryStream outputStream = new MemoryStream();

                Codecs.UUDecode(inputStream, outputStream);
                byte[] decodedDataBytes = outputStream.ToArray();
                return(decodedDataBytes);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
        }