I came across this issue, and just applied a base64 sledgehammer to the output (which is what the Rails patch mentioned in the Trac issue does also).

I did consider the Vigenère-cipher-style approach, but at that point I had already done most of the work for this and didn't want to go back. Should I?