Base64 encoding/decoding module (adopted from http://www.fourmilab.ch/webtools/base64)