I am looking for a method to recode a String that only consists of digits [0,1,2,...8,9] into another String of a different character set like digits and letters [0,1,...9,a,b,...z] (as an example). The resulting string should typically be shorter than the digit-only String. The method should be reversible and it should be fast. Source code in C# answers would be appreciated but gerneal ideas are also welcome ;-) Example:
Input: "1234567890123"
Output: "ar4cju7d"
The output of the reversing method applied to "ar4cju7d" should be "1234567890123.