Added BASE64 encoding and decoding methods.