The .net provides its own implementation of converting to/from base64 encoding but sometime i see people writing their own encodes. Just wondering what could be the real life applications where you will have to write your custom encoder rather using the one that .net provides
Asked
Active
Viewed 551 times
0
-
2Where have you seen people writing their own? I haven't heard of that – Rup Dec 23 '10 at 17:27
-
http://dotnet.sys-con.com/node/192527 – imak Dec 23 '10 at 17:42
-
Your link is about *understanding* a base64 encoder. Other than that, there's no reason to write your own. – Dec 23 '10 at 17:50
-
@yodaj007 Excrept from that link "A Lightweight Custom Base64 Encoder The .NET Framework's ToBase64-String() and FromBase64String() methods will meet most of your Base64 encoding needs. However what if you are developing a system and need a slightly different encoding scheme? For instance, you may want to use a different character set than the normal{"A"-"Z," "a"-"z," "0"-9," "+," "/"} set. In this section I'll present a lightweight, custom Base64 encoder written in C# " – imak Dec 23 '10 at 23:47
1 Answers
3
These generally occur in code ported from another environment.
.Net has sufficient Bas64 capabilities in Convert.ToBase64String
and System.Security.Cryptography.ToBase64Transform
; there is no need to write your own.

SLaks
- 868,454
- 176
- 1,908
- 1,964