base64-legacy v3.0.0
Base64.js
Table of contents
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.