This is a discussion on How to Encode a text and Decode it to get the original text using c# .Net? within the C# Programming forums, part of the Software Development category; How to Encode a text and Decode it to get the original text using c# .Net?...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi Archer.. Here is the answer for your query.. This encode function will encode a string and then convert it into base64 string. public string Encode(string str) { byte[] encbuff = System.Text.Encoding.UTF8.GetBytes(str); return Convert.ToBase64String(encbuff); } The Decode function will retrieve the string from the base64 string. public string Decode(string str) { byte[] decbuff = Convert.FromBase64String(str); return System.Text.Encoding.UTF8.GetString(decbuff); } |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What is Hidden Text? | H2o | Search Engine Optimization | 2 | 12-19-2007 04:15 PM |
| Text Box in PHP | varghese | PHP Programming | 2 | 11-09-2007 11:24 PM |
| How do I check that text entered in a text form field is an integer? | itbarota | HTML, CSS and Javascript Coding Techniques | 2 | 10-26-2007 12:25 AM |
| What is encode & decode function in Javascript? | raj | HTML, CSS and Javascript Coding Techniques | 1 | 07-28-2007 01:11 AM |
| CSS Text Blur | muthukumar | HTML, CSS and Javascript Coding Techniques | 0 | 07-17-2007 01:22 PM |