code: private String consistentShuffle(String alphabet, String salt){
      if(salt.length() <= 0)
        return alphabet;
  
      char[] arr = salt.toCharArray();
      int asc_val, j;
      char tmp;
      for(int i = alphabet.length() - 1, v = 0, p = 0; i > 0; i--, v++){
        v %= salt.length();
        asc_val = (int)arr[v];
        p += asc_val;
        j = (asc_val + v + p) % i;
  
        tmp = alphabet.charAt(j);
        alphabet = alphabet.substring(0, j) + alphabet.charAt(i) + alphabet.substring(j + 1);
        alphabet = alphabet.substring(0, i) + tmp + alphabet.substring(i + 1);
      }
  
      return alphabet;
    }
docs: /* Private methods