473,405 Members | 2,421 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Base64 Decoding

Hi All,

Could you please give me some guidelines on dealing with
Base64 encoded string.
The actual purpose is to decode Base64 Encoded string
and stream the data to a browser so that it can be viewed
in a web application

Regards,
Kuldeep
Aug 30 '06 #1
2 7351
Not sure what exactly you are looking for. If you are finding a way to
decode a base64 string, use Convert.FromBase64String()

"Kuldeep" <ku****************@hotmail.comwrote in message
news:uw**************@TK2MSFTNGP04.phx.gbl...
Hi All,

Could you please give me some guidelines on dealing with
Base64 encoded string.
The actual purpose is to decode Base64 Encoded string
and stream the data to a browser so that it can be viewed
in a web application

Regards,
Kuldeep
Aug 30 '06 #2
public static string Base64Encode(string data) {
byte[] myBytes = Encoding.ASCII.GetBytes(data.Trim().ToCharArray()) ;
return Convert.ToBase64String (myBytes);
}

public static string Base64Decode(string data) {
try {
return Encoding.ASCII.GetString (Convert.FromBase64String (data.Trim()));
} catch {
// Invalid String!
return "";
}
}

"Kuldeep" wrote:
Hi All,

Could you please give me some guidelines on dealing with
Base64 encoded string.
The actual purpose is to decode Base64 Encoded string
and stream the data to a browser so that it can be viewed
in a web application

Regards,
Kuldeep
Oct 3 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ramy076 | last post by:
I have a C App which uses openssl for Encoding and decoding which needs to be ported to java. The decoded text does not match between the C App and the java App. The size of the output itself is...
1
by: Oliver Kurz | last post by:
Hello, I have a problem by converting a string to base64 and back again. I have a string with german special chars like äöüß. This string i convert with base64str=base64.encode('äöüß') into...
27
by: gRizwan | last post by:
Hello all, We have a problem on a webpage. That page is sent some email data in base64 format. what we need to do is, decode the base64 data back to original shape and extract attached image...
7
by: Julia | last post by:
Hi I am trying to pass an encoded string to a JavaScript the following is the C# code which convert the string STRING_TO_ENCODE to base64 byte bytIn =...
14
by: BB | last post by:
Hello. i am trying to decode a block of (what i think is) base64 into text, and i have NO idea how to begin. I'm going to paste the whole string here, but i want to know the steps necessary to...
8
by: Jeremy Kitchen | last post by:
I have encoded a string into Base64 for the purpose of encryption. I then later decrypted it and converted it back from Base64 the final string returns with four nothing characters. "pass" what...
10
by: pycraze | last post by:
Hi , I am currently trying to implement base64 encoding and decoding scheme in C . Python has a module , base64 , that will do the encoding and decoding with ease . I am aware of OpenSSL having...
3
by: d-fan | last post by:
void decodebio( unsigned char *encbuf, unsigned char * decbuf, int destbuf ) { /* Read Base64 encoded data from standard input and write the decoded data to standard output: */ BIO...
3
by: ashu | last post by:
I am searching for Win32 (or WinMobile) API for converting ASCII string to Base64 and vice-versa can anyone help me out.... Thanks in advance...
1
by: Bryan A | last post by:
I'm having a problem decoding an encrypted Base64 string (with a key). I am trying to encode and decode with a url friendly version. It works if I use them seperate but when I try to put them both...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.