System.Buffers.Text.Base64Url
public static OperationStatus DecodeFromChars(ReadOnlySpan<char> source, Span<byte> destination, out int charsConsumed, out int bytesWritten, bool isFinalBlock = true)
Decodes the span of unicode ASCII chars represented as Base64Url into binary data.
Decodes the span of unicode ASCII chars represented as Base64Url into binary data.
Decodes the span of unicode ASCII chars represented as Base64Url into binary data.
public static OperationStatus DecodeFromUtf8(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesConsumed, out int bytesWritten, bool isFinalBlock = true)
Decodes the span of UTF-8 encoded text represented as Base64Url into binary data.
Decodes the span of UTF-8 encoded text represented as Base64Url into binary data.
Decodes the span of UTF-8 encoded text represented as Base64Url into binary data.
Decodes the span of UTF-8 encoded text in Base64Url into binary data, in-place.
The decoded binary output is smaller than the text data contained in the input (the operation deflates the data).
public static OperationStatus EncodeToChars(ReadOnlySpan<byte> source, Span<char> destination, out int bytesConsumed, out int charsWritten, bool isFinalBlock = true)
Encodes the span of binary data into unicode ASCII chars represented as Base64Url.
Encodes the span of binary data into unicode ASCII chars represented as Base64Url.
Encodes the span of binary data into unicode ASCII chars represented as Base64Url.
Encodes the span of binary data into unicode string represented as Base64Url ASCII chars.
public static OperationStatus EncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesConsumed, out int bytesWritten, bool isFinalBlock = true)
Encodes the span of binary data into UTF-8 encoded text represented as Base64Url.
Encodes the span of binary data into UTF-8 encoded text represented as Base64Url.
Encodes the span of binary data into UTF-8 encoded text represented as Base64Url.
Returns the length (in bytes) of the result if you were to encode binary data within a byte span of size bytesLength.
Returns the maximum length (in bytes) of the result if you were to decode base 64 encoded text from a span of size base64Length.
Validates that the specified span of text is comprised of valid base-64 encoded data.
Validates that the specified span of text is comprised of valid base-64 encoded data.
Validates that the specified span of UTF-8 text is comprised of valid base-64 encoded data.
Validates that the specified span of UTF-8 text is comprised of valid base-64 encoded data.
public static bool TryDecodeFromChars(ReadOnlySpan<char> source, Span<byte> destination, out int bytesWritten)
Decodes the span of unicode ASCII chars represented as Base64Url into binary data.
public static bool TryDecodeFromUtf8(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten)
Decodes the span of UTF-8 encoded text represented as Base64Url into binary data.
public static bool TryEncodeToChars(ReadOnlySpan<byte> source, Span<char> destination, out int charsWritten)
Encodes the span of binary data into unicode ASCII chars represented as Base64Url.
public static bool TryEncodeToUtf8(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten)
Encodes the span of binary data into UTF-8 encoded chars represented as Base64Url.
Encodes the span of binary data (in-place) into UTF-8 encoded text represented as base 64.
The encoded text output is larger than the binary data contained in the input (the operation inflates the data).