I am trying to increments the chars in my string (ie string x = (aaaa) all the way through (zzzz)). Is there a specific way I can use a loop to do this? I'm sorry if my question is newbie, I'm new to coding...XP
One way would be to interpret characters 'a' to 'z' as digits in a number with base 26, start at "aaaa" (representing 0), and then adding 1 to the last string. Add or subtract 'a' for conversion between character and "digit" value.
Instead of storing the string as your state, you could also store the values, and convert to the string for passing to crypt only.
On addition, use a carry variable, and break the loop when you find you're out of characters and still have a carry value (which means you're back to "aaaa").
Another way would be four nested loops (which is very inflexible), or recursion, with any level of recursion controlling one character.