Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

base32-encode

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

base32-encode

Base32 encoder with support for multiple variants.

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
17K
decreased by-83.55%
Maintainers
1
Weekly downloads
 
Created
Source

Base32 Encode

Base32 encoder with support for multiple variants.

Installation

npm install --save base32-encode

Usage

const base32Encode = require('base32-encode')
const { buffer } = new Uint8Array([0x74, 0x65, 0x73, 0x74])

console.log(base32Encode(buffer, 'Crockford'))
//=> EHJQ6X0

console.log(base32Encode(buffer, 'RFC4648'))
//=> ORSXG5A=

console.log(base32Encode(buffer, 'RFC4648-HEX'))
//=> EHIN6T0=

API

base32Encode(buffer, variant)

  • buffer <ArrayBuffer>
  • variant <String>

Encode the data in buffer. variant should be one of the supported variants listed below.

  • 'RFC3548' - Alias for 'RFC4648'
  • 'RFC4648' - Base32 from RFC4648
  • 'RFC4648-HEX' - base32hex from RFC4648
  • 'Crockford' - Crockford's Base32

See also

Keywords

FAQs

Package last updated on 14 Dec 2017

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