Microsoft.IdentityModel.Tokens.Base64UrlEncoding
For Non-Net9.0 Targets: Base64 encode/decode implementation for as per https://tools.ietf.org/html/rfc4648#section-5.
For Net9.0 Targets: Uses System.Buffers.Text.Base64Url to perform the encoding/decoding.
Uses ArrayPool[T] to minimize memory usage.
Decodes a base64url encoded string into a byte array.
Decodes a base64url encoded substring of a string into a byte array.
public static T Decode<T, TX>(string input, int offset, int length, TX argx, Func<byte[], int, TX, T> action)
Decodes a base64url encoded substring of a string and then performs an action on the decoded bytes.
Decodes a base64url encoded substring of a string and then performs an action on the decoded bytes.
public static T Decode<T, TX, TY, TZ>(string input, int offset, int length, TX argx, TY argy, TZ argz, Func<byte[], int, TX, TY, TZ, T> action)
Decodes a base64url encoded substring of a string and then performs an action on the decoded bytes.
Encodes a byte array into a base64url encoded string.
Encodes a subset of a byte array into a Base64Url encoded string.