|
|
|
|
|
|
|
|
public boolean valid() { |
|
|
public boolean valid() { |
|
|
|
|
|
|
|
|
boolean usernameGiven = false; |
|
|
boolean usernameGiven = false; |
|
|
String hashData; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//iterator over file |
|
|
//iterator over file |
|
|
for (String line: |
|
|
for (String line: |
|
|
Helpers.readTextdatei("data/passwd.txt")) { |
|
|
Helpers.readTextdatei("data/passwd.txt")) { |
|
|
if(login == line) { |
|
|
|
|
|
|
|
|
if(login.equals(line)) { |
|
|
usernameGiven = true; |
|
|
usernameGiven = true; |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
if(usernameGiven && hash == line) { |
|
|
|
|
|
|
|
|
if(usernameGiven && hash.equals(line)) { |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
|
|
|
|