3.0.0 • Published 3 years ago

base64-legacy v3.0.0

Weekly downloads
432
License
GPL-3.0
Repository
gitlab
Last release
3 years ago

Base64.js

Table of contents

  1. The problem we solve
  2. Installation
  3. Provided Functions
  4. Project Structure
  5. Licence

One-file library for old school (76-char lines) base64 encoding in pure javascript.

The problem

Javascript provides the native atob and btoa functions BUT they dont implement the legacy line break every 76 charachters.

This introduces compatibility problems with other services/applications that expect the text in that way (for example SSH-KEY engines).

Instalation

This project can be installed using git directly

    git clone https://gitlab.com/sexycoders/base64.js

added as a submodule to a project

    git submodule add https://gitlab.com/sexycoders/base64.js

or using npm locally or globaly

    npm install (-g) base64-js

Provided Functions

This library simply wraps the native javascript functions with a "line-breaker" and returns the result.

There are two functions with NO OBJECTS:

  • base64_encode(input plain string) -> returns base64 string with line breaks
  • base64_decode(input base64 string) -> returns plain string

:information_source: All the code is published as ONE, uglified file and can be used as-is in your web app or node application.

Structure

Upon installing from npm you will get the following:

  • the library (uglified file) under lib
  • the sources under src

Licence

This project is available under the GPL-v3 or later licence as described in the LICENCE file.

3.0.0

3 years ago

2.9.0

3 years ago

2.8.0

3 years ago

2.7.0

3 years ago

2.6.0

3 years ago

2.5.0

3 years ago

2.4.0

3 years ago

2.3.0

3 years ago

2.2.0

3 years ago

2.1.0

3 years ago

2.0.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago