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.
- Host: GitHub
- URL: https://github.com/digitalbazaar/base64url-universal
- Owner: digitalbazaar
- License: other
- Created: 2019-02-19T15:14:15.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2022-08-25T18:50:45.000Z (almost 4 years ago)
- Last Synced: 2025-08-23T18:20:49.723Z (10 months ago)
- Language: JavaScript
- Homepage:
- Size: 32.2 KB
- Stars: 5
- Watchers: 11
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
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. |