Test 2
This commit is contained in:
parent
476a5b6ed1
commit
47a7b92917
@ -11,9 +11,21 @@ public class Credentials {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean valid() {
|
public boolean valid() {
|
||||||
|
|
||||||
|
boolean usernameGiven = false;
|
||||||
|
String hashData;
|
||||||
|
|
||||||
|
//iterator over file
|
||||||
for (String line:
|
for (String line:
|
||||||
Helpers.readTextdatei("data/passwd.txt")) {
|
Helpers.readTextdatei("data/passwd.txt")) {
|
||||||
System.out.println(line);
|
if(login == line) {
|
||||||
|
usernameGiven = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if(usernameGiven && hash == line) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user