encode strings in a way that m2secret would like