New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

buffer-base62

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

buffer-base62

This library will transform the binary buffer to base62 string that used 62 character to describe any data

latest
Source
npmnpm
Version
0.1.2
Version published
Weekly downloads
210
24.26%
Maintainers
1
Weekly downloads
 
Created
Source

buffer-base62

This library will transform the binary buffer to base62 string that used 62 character to describe any data

Usage

let BufferBase62 = require('./buffer-base62');

let rawData = "let's have a try, this is a text that not encrypted";
{
    let bufferRawData = Buffer.from(rawData);
    console.log('bufferRawData', bufferRawData);  //output: bufferRawData <Buffer 6c 65 74 27 73 20 68 61 76 65 20 61 20 74 72 79 2c 20 74 68 69 73 20 69 73 20 61 20 74 65 78 74 20 74 68 61 74 20 6e 6f 74 20 65 6e 63 72 79 70 74 65 ... >
    let base62Data = BufferBase62.toBase62(bufferRawData);
    console.log('base62Data', base62Data); //output: base62Data 3fO7Uqb2oHZjEALizByUEmtsJq86GWI6W3h0OxRZZXVGqiBeoM4bwZf7DuKh4EpfaHcEG
    let restoreData = BufferBase62.fromBase62(base62Data);
    console.log('restoreData', restoreData.toString('utf-8')); //output restoreData let's have a try, this is a text that not encrypted
}

Keywords

base62

FAQs

Package last updated on 13 Sep 2018

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