Socket
Socket
Sign inDemoInstall

@digitalcredentials/base64url-universal

Package Overview
Dependencies
Maintainers
9
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@digitalcredentials/base64url-universal

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


Version published
Maintainers
9
Created
Source

Universal base64url Library (@digitalcredentials/base64url-universal)

Build status NPM Version

A Javascript isomorphic library for base64url text encoding, for Node.js, React Native and browsers

Table of Contents

Background

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.

Security

TBD

Install

  • Node.js 16+ is recommended.

NPM

To install via NPM:

npm install @digitalcredentials/base64url-universal

Development

To install locally (for development):

git clone https://github.com/digitalcredentials/base64url-universal.git
cd base64url-universal
npm install

Usage

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.

Contribute

PRs accepted.

If editing the Readme, please conform to the standard-readme specification.

License

MIT License © 2023 Digital Credentials Consortium.

Keywords

FAQs

Package last updated on 06 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc