karlroberts/base64 — pull request #1 by markhibberd (2013-04-26 01:46:56+00:00)
Title: Added conveniences for encode/decode with string/byte[] types flipped.

This formulation is useful for doing any crypto work. Basically you get a String input, need to encode it to base64 so the encoding doesn't get mangled by the cipher, use the resulting bytes for cipher and then decode in reverse, bytes back to the original string.

Diff is a little bit of a mess as there was a bunch of extra whitespace at the end of the lines that I trimmed off (or editor did), and there is a mix of tabs and spaces in the original file. I just went with the flow and added tabs where they were before.

__warning__: this may break compatibility in a subtle way in that it is now a compile error to pass a literal null (a variable that is null remains same) to the encode/decode methods. But given that you throw an exception straight away, this seems like an acceptable thing. If you
don't want to have that change, I can rename to remove the overloading.

__info__: second commit is just to convert the readme to markdown so it renders properly on github, ignore or take as you want.