You can encode each character as a two-digit number, 0-9 as the numbers themselves, 10-35 as AZ.
For example, 9AC8 would be 09 10 12 08 = 09101208.
EDIT: For a small number, you can use this approach (using Java style psuedocode):
char[] availableChars = ['A', 'B', ... , '0', ... '9', '-', '_', '.']; long hash = 0; long base = 1; for (char c in string.toCharArray()) for (int key=0; key < availableChars.length; key++) if (availableChars[key] != c) continue; hash += base*key; base = base*availableChars.length return hash;
redolent
source share