2.0.0 • Published 2 years ago

base64url-universal v2.0.0

Weekly downloads
3,198
License
BSD-3-Clause
Repository
github
Last release
2 years ago

base64url-universal

Encode/Decode input according to the "Base64url Encoding" format as specified in JSON Web Signature (JWS) RFC7517. A URL safe character set is used and trailing '=', line breaks, whitespace, and other characters are omitted.

encode(input) ⇒ string

Encodes input according to the "Base64url Encoding" format as specified in JSON Web Signature (JWS) RFC7517. A URL safe character set is used and trailing '=', line breaks, whitespace, and other characters are omitted.

Kind: Exported function
Returns: string - the encoded value.

ParamTypeDescription
inputUint8Array | stringthe data to encode.

decode(input) ⇒ Uint8Array

Decodes input according to the "Base64url Encoding" format as specified in JSON Web Signature (JWS) RFC7517. A URL safe character set is used and trailing '=', line breaks, whitespace, and other characters are omitted.

Kind: Exported function
Returns: Uint8Array - the decoded value.

ParamTypeDescription
inputstringthe data to decode.