Base64GetBytes(ReadOnlySpanChar) Method

Converts a Base64-encoded read-only character span into a corresponding Byte array.

Definition

Namespace: FolkerKinzel.Strings
Assembly: FolkerKinzel.Strings (in FolkerKinzel.Strings.dll) Version: 9.5.0+6287955de434d14f61638ea0c3c40b499ae05cd1
C#
public static byte[] GetBytes(
	ReadOnlySpan<char> base64
)

Parameters

base64  ReadOnlySpanChar
The read-only character span to convert.

Return Value

Byte
A byte array decoded from base64.

Exceptions

FormatException

The length of base64 with ignored white space characters is not zero or a multiple of 4.

- oder -

The format of base64 is invalid. base64 contains a non-Base64 character, more than two padding characters, or a non-space character between the padding characters.

See Also