bazinga64

6.3.11 • Public • Published

Wire

This repository is part of the source code of Wire. You can find more information at wire.com or by contacting opensource@wire.com.

You can find the published source code at github.com/wireapp.

For licensing information, see the attached LICENSE file and the list of third-party licenses at wire.com/legal/licenses/.

Installation

yarn add bazinga64
npm -i bazinga64
const bazinga64 = require('bazinga64');

Development

yarn
yarn dist

Usage

// Encoding
const encoded = bazinga64.Encoder.toBase64('Hello');
const base64 = encoded.asString;
console.log(base64); // "SGVsbG8="
// Decoding
const decoded = bazinga64.Decoder.fromBase64('SGVsbG8=');
const text = decoded.asString;
console.log(text); // "Hello"

TypeScript Usage

import {Decoder} from 'bazinga64';
const typedArray: Uint8Array = Decoder.fromBase64('SGVsbG8=').asBytes;

API

Decoder

  • fromBase64

Encoder

  • toBase64
  • toBase64Url

Converter

  • arrayBufferViewToString
  • arrayBufferViewToStringUTF8
  • arrayBufferViewToBaselineString
  • jsonToArrayBufferView
  • numberArrayToArrayBufferView
  • stringToArrayBufferViewUTF16
  • stringToArrayBufferViewUTF8
  • hexStringToArrayBufferView
  • toArrayBufferView
  • toString

Package Sidebar

Install

npm i bazinga64

Weekly Downloads

447

Version

6.3.11

License

GPL-3.0

Unpacked Size

58.5 kB

Total Files

27

Last publish

Collaborators

  • augustocdias_wire
  • beltram_wire
  • tlebon
  • typfel
  • wireapp-owner
  • wireapp-member
  • bennycode