Browse Source

Test 3

master
Bruno Klasing 2 years ago
parent
commit
d9c4bae6a4
2 changed files with 4 additions and 4 deletions
  1. 3
    3
      src/Credentials.java
  2. 1
    1
      src/Main.java

+ 3
- 3
src/Credentials.java View File

@@ -14,16 +14,16 @@ public class Credentials {
public boolean valid() {

boolean usernameGiven = false;
String hashData;

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


+ 1
- 1
src/Main.java View File

@@ -2,4 +2,4 @@ public class Main {
public static void main(String[] args) {

}
}
}

Loading…
Cancel
Save