PC Review


Reply
Thread Tools Rate Thread

Base64 Decoding

 
 
Kuldeep
Guest
Posts: n/a
 
      30th Aug 2006
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


 
Reply With Quote
 
 
 
 
=?Utf-8?B?SGFyZHkgV2FuZw==?=
Guest
Posts: n/a
 
      3rd Oct 2006
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
>
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Base64 decoding issue Brian Microsoft Outlook Discussion 0 28th Sep 2009 07:12 PM
Stream based base64 encoding/decoding nickdu Microsoft Dot NET Framework 3 12th Jan 2009 03:47 PM
Decoding Base64 Jennyfer Barco Microsoft VB .NET 2 29th Jun 2006 09:02 AM
Base64 encoding/decoding nly Microsoft C# .NET 3 24th Oct 2005 07:09 AM
decoding a received email message (base64, uuencode, etc.)? john s Microsoft C# .NET 0 30th Oct 2003 12:47 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:11 AM.