Home Reference Source

Function

Static Public Summary
public

base64Url(input: String | Buffer): String

Converts an input buffer or input string to UTF8 encoded Base64Url.

public

base64UrlToBuffer(input: String): Buffer

Converts a UTF8 encoded base64url string to a Buffer.

Static Public

public base64Url(input: String | Buffer): String source

Converts an input buffer or input string to UTF8 encoded Base64Url.

Params:

NameTypeAttributeDescription
input String | Buffer

input string or buffer

Return:

String

encoded output

public base64UrlToBuffer(input: String): Buffer source

import {base64UrlToBuffer} from '@token-io/core/src/security/Base64UrlCodec.js'

Converts a UTF8 encoded base64url string to a Buffer.

Params:

NameTypeAttributeDescription
input String

input string

Return:

Buffer

buffer output