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.4.3+0b4e3cc14d7870504a77e224d298b921bfc6f2ee
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