Base64Url.EncodeToString(ReadOnlySpan<Byte>) Method

Definition

Encodes the span of binary data into unicode string represented as Base64Url ASCII chars.

C#
public static string EncodeToString(ReadOnlySpan<byte> source);

Parameters

source
ReadOnlySpan<Byte>

The input span which contains binary data that needs to be encoded.

Returns

A string which contains the result of the operation, i.e. the ASCII string in Base64Url.

Remarks

This implementation of the base64url encoding omits the optional padding characters.

Applies to

Product Versions
.NET 8 (package-provided), 9, 10
.NET Standard 2.0 (package-provided), 2.1 (package-provided)