Some years back when I was still a beginner at programming, I found some code online that could generate a bruteforce-code given an offset.

So for instance, if I did `GetPassword(1)` it would return "a", and if I did `GetPassword(2)` it would return "b" etc.

Every increment of the offset would provide the next possible combination of strings. A minimum and maximum length of the "password to guess" could also be provided.

Now I have no idea where this code is, or what the algorithm is called. I want to implement one myself, since I need it for URL-enshortening purposes. A user generates a URL that I want to look somewhat long these lines: <http://fablelane.com/i/abc> where "abc" is the code.