Simple JavaScript library to encode/decode Base64.
Examples:
To Encode: Base64.encode('textToEncode'); (returns dGV4dFRvRW5jb2Rl)
To Decode: Base64.decode('dGV4dFRvRW5jb2Rl'); (returns textToEncode)
Plnkr: http://plnkr.co/edit/u5EetU?p=preview
Version:
- 1.0 - Initial Release
Created by Timothy George. MIT License. www.tgeorge.net
This code was found on StackOverflow. I redesigned it into a format which I prefer. Basically, only 2% of this code is actually mine. If you find this useful, head over there and upvote the question and answers. http://stackoverflow.com/questions/246801/how-can-you-encode-a-string-to-base64-in-javascript