title: Permutations in Java without using an array
body: <p>The code below loops through all of the characters submitted, puts them into a string array and then after hashing them, checks against the hashed password originally entered. This logic works fine for up to 5 character passwords however when I get to 6 characters the number of permutations (36^6) is so large that a memory exception is thrown due to the size of the array being too large.</p>
  
  <p>I am therefore trying to modify it too use just string rather than an array to stop this memory issue but cant quite get it to work, any obvious suggestions?</p>