Base64 encoding and decoding with ASCII string representation.
npm install bazinga64This 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/.
```
yarn add bazinga64
``
npm -i bazinga64
`javascript`
const bazinga64 = require('bazinga64');
``
yarn
yarn dist
`javascript`
// Encoding
const encoded = bazinga64.Encoder.toBase64('Hello');
const base64 = encoded.asString;
console.log(base64); // "SGVsbG8="
`javascript`
// Decoding
const decoded = bazinga64.Decoder.fromBase64('SGVsbG8=');
const text = decoded.asString;
console.log(text); // "Hello"
`typescript`
import {Decoder} from 'bazinga64';
const typedArray: Uint8Array = Decoder.fromBase64('SGVsbG8=').asBytes;
- fromBase64
- toBase64toBase64Url
-
- arrayBufferViewToStringarrayBufferViewToStringUTF8
- arrayBufferViewToBaselineString
- jsonToArrayBufferView
- numberArrayToArrayBufferView
- stringToArrayBufferViewUTF16
- stringToArrayBufferViewUTF8
- hexStringToArrayBufferView
- toArrayBufferView
- toString`
-