Base64UrlEncoder Class

Definition

Encodes and Decodes strings as Base64Url encoding.

public static class Base64UrlEncoder
type Base64UrlEncoder = class
Public Class Base64UrlEncoder
Inheritance
Base64UrlEncoder

Methods

Decode(String)

Decodes the string from Base64UrlEncoded to UTF8.

DecodeBytes(String)

Converts the specified string, base-64-url encoded to utf8 bytes.

Encode(Byte[])

Converts a subset of an array of 8-bit unsigned integers to its equivalent string representation which is encoded with base-64-url digits.

Encode(Byte[], Int32, Int32)

Converts a subset of an array of 8-bit unsigned integers to its equivalent string representation which is encoded with base-64-url digits. Parameters specify the subset as an offset in the input array, and the number of elements in the array to convert.

Encode(String)

The following functions perform base64url encoding which differs from regular base64 encoding as follows

  • padding is skipped so the pad character '=' doesn't have to be percent encoded
  • the 62nd and 63rd regular base64 encoding characters ('+' and '/') are replace with ('-' and '_') The changes make the encoding alphabet file and URL safe.

Applies to