Add base 64 codec + minor mask fix