Serializes a ByteArray into a Base64-encoded string.
The encoder used for encoding the Base64 string.
The ByteArray that needs to be serialized.