The cable should be universal. It is the charger that may be the issue. If the charger isn't rated the same as the original, you might take longer to charge.
But I honestly tend to stick to using the one that came with the device.
The cable that comes with the S5 is a USB 3 cable. It will allow faster data transfer to your phone -- providing you hook it up to a USB3 port on a computer.
As long as your power source provides at least 5V/2.1 amps, you can use a miniUSB cable to charge the phone. It'll plug into the right hand side of the port. I don't know if it'll transfer data though -- haven't tried that yet.
You can use any cable but don't buy the cheapest cables because they are limited amperage transfer. So many people have troubles charging slow because of cables