Skip to content

Instantly share code, notes, and snippets.

@doug
Created November 10, 2016 00:18
Show Gist options
  • Save doug/6fb221f79e009ce35e8c92deed1d3353 to your computer and use it in GitHub Desktop.
Save doug/6fb221f79e009ce35e8c92deed1d3353 to your computer and use it in GitHub Desktop.
function b64encode(arr) {
return btoa(String.fromCharCode.apply(null, arr));
}
function b64decode(str) {
return atob(str).split('').map(function (c) { return c.charCodeAt(0); });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment