base64url-universal

Encode/decode "Base64url Encoding" format of JSON Web Signature (JWS) RFC7517.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
base64url-universal
2.0.02 years ago5 years agoMinified + gzip package size for base64url-universal in KB

Readme

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)](#exp_module_base64url-universal--encode) ⇒ <code>string</code> ⏏
* [decode(input)](#exp_module_base64url-universal--decode) ⇒ <code>Uint8Array</code> ⏏

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.
| Param | Type | Description | | --- | --- | --- | | input | Uint8Array \| string | the 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.
| Param | Type | Description | | --- | --- | --- | | input | string | the data to decode. |