Search code examples
.netbase64encoder

.NET base 64 encoder. When will i have to write custom encode for it?


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


Solution

  • 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.