1

I am rewriting this piece of code and couldn't find C# alternative.

java.util.Base64.getMimeDecoder().decode(bytes)

Also, I don't see any mentioning of MIME scheme in official .NET Core base64 converter https://learn.microsoft.com/en-us/dotnet/api/system.convert.frombase64string?view=net-6.0

Could you help me find an alternative?

AlexZholob
  • 317
  • 1
  • 16
  • 2
    `Convert.FromBase64String(System.Text.Encoding.UTF8.GetString(bytes))`. – 41686d6564 stands w. Palestine Aug 30 '22 at 14:46
  • @41686d6564standsw.Palestine no it's completely different result. https://docs.oracle.com/javase/8/docs/api/java/util/Base64.html Please see MIME decoding. The result is different from the C# decoding – AlexZholob Sep 01 '22 at 12:06
  • @Charlieface no, it's decoding simple base64 basic, please see: https://docs.oracle.com/javase/8/docs/api/java/util/Base64.html I need to have mime decoding – AlexZholob Sep 01 '22 at 12:07

0 Answers0