0
there is a program" password generator" in code playground it is showing a password as output but I did not understand what is that password n which password it is?can anyone help me to find it out?
4 odpowiedzi
0
it is just an utility program to generate password. You can use it in your application to generate 1st time password for user
0
OK
0
Start by examining line 25
passSymbols.length() returns the length of the passSymbols String. Pretend that it returned 50 (I didn't actually count).
Now, examine rnd.nextInt(50) the way random numbers work here is by choosing a random number between 0 and 49. Pretend that it chose the number 2 (it could be any number from 0-49).
Then we have passSymbols.charAt(2). This returns the character at position number 2 in passSymbols. Remember that the first character is in position 0,the second character is in position 1, the third character is in position 2,and so on.
This happens 8 times since it is all inside of a for loop and thus generates a new random number each time. Therefore, you end up with a seemingly random password.
0
can you give me hacking code