Quick solution I wrote for http://www.codewars.com/kata/5270f22f862516c686000161, which encodes String types to base64 representation and decodes the other way around.