An open API service indexing awesome lists of open source software.

https://github.com/digitalbazaar/base64url-universal

Encode/decode "Base64url Encoding" format of JSON Web Signature (JWS) RFC7517.
https://github.com/digitalbazaar/base64url-universal

Last synced: 4 months ago
JSON representation

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

Awesome Lists containing this project

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.

* [base64url-universal](#module_base64url-universal)
* [encode(input)](#exp_module_base64url-universal--encode) ⇒ string
* [decode(input)](#exp_module_base64url-universal--decode) ⇒ Uint8Array

### 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. |