bazinga64

Base64 encoding and decoding with ASCII string representation.


Keywords
array, ascii, base64, browsers, buffer, decode, decoding, encode, encoding, nodejs, string
License
GPL-3.0
Install
bower install bazinga64

Documentation

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/wire.

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

Build Status

Build Status

Installation

Browser

bower install bazinga64
<script src="bower_components/bazinga64/dist/browser/bazinga64.js" />
var bazinga64 = window.bazinga64;

Node.js

npm install bazinga64
var bazinga64 = require('bazinga64');

Development

npm install
gulp default

Usage

// Encoding
var encoded = bazinga64.Encoder.toBase64('Hello');
var base64 = encoded.asString;
console.log(base64); // "SGVsbG8="

// Decoding
var decoded = bazinga64.Decoder.fromBase64('SGVsbG8=');
var 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