Skip to content

Base64 String decoding #50233

@NUnitTester

Description

@NUnitTester

Description

the following Code was used:
string base64String = ...;
Convert.FromBase64String(base64String);

"asdfghw=" ok, Result: < 106, 199, 95, 130, 28 >
"asdfghw=asdfghw=" ok, Exception
"asdfghw==" wrong! Should be Exception, but gives a total wrong result with less Bytes than the first one. Result: < 106, 199, 95, 135 >

.NET 4.8
Windows 10
x64, x86

. NET 3.1 Core
"asdfghw=="
System.FormatException: "The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters."

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions