Base64GetBytes(ReadOnlySpan`1Char) 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.0+10a7d4d71aa960998e32ac0ac6c4fcbe4164c917
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