
This is a collection of functions for working with base64.
The encodeBase64 function encodes an array of integers into a base64 string.
import { encodeBase64 } from '@aracna/core';
// will log "aGVsbG8="
console.log(encodeBase64([104, 101, 108, 108, 111]));The decodeBase64 function decodes a base64 string into a Uint8Array.
import { decodeBase64 } from '@aracna/core';
// will log [104, 101, 108, 108, 111]
console.log(decodeBase64('aGVsbG8='));The encodeBase64URL function encodes an array of integers into a base64 URL string.
import { encodeBase64URL } from '@aracna/core';
// will log "aGVsbG8"
console.log(encodeBase64URL([104, 101, 108, 108, 111]));The decodeBase64URL function decodes a base64 URL string into a Uint8Array.
import { decodeBase64URL } from '@aracna/core';
// will log [104, 101, 108, 108, 111]
console.log(decodeBase64URL('aGVsbG8'));