Fix code and add convenience method to Base64Encoder