It depends on the String `s`, which in turn depends on the ByteArray `ba`. I can't see an easier way to do it, do you have any ideas?