Edit (now that I've done the math)
There are around 6*10^36 possible combinations you'll need to iterate through - the largest long
value is about 9*10^18 - a much smaller number.
That being said, say you find an optimized way to iterate over the combinations where you can generate and compare a trillion (10^12) combinations per second (much faster than your average developer's machine), and you can parallelize it across a million machines - that would be (60*60*24*365*10^12)*10^6 per year, or about 3*10^25 combinations checked per year.
At that blazing speed, it would still take ~190 billion years to go over all combinations.
I strongly urge you to investigate another alternative for achieving your goal instead of trying every single key.
Now (back to my original answer), if you had a reasonably sized subset of keys you wanted to iterate over, I could imagine doing something like this with a straight up number loop that just converted the number to a modified base-26 for the key.
Some pseudo-code:
public void runAlgorithm () {
for (int i=startKey; i<endKey; i++) {
String key = toBase26(i);
testKey(key);
}
}
Use something like this hexavigesimal converter from wikipedia for the impl of toBase26
(copied below):
public static String toBase26(int number){
number = Math.abs(number);
String converted = "";
// Repeatedly divide the number by 26 and convert the
// remainder into the appropriate letter.
do
{
int remainder = number % 26;
converted = (char)(remainder + 'A') + converted;
number = (number - remainder) / 26;
} while (number > 0);
return converted;
}