Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
susw12 committed Apr 29, 2017
2 parents 53a4334 + ddccbd2 commit a695107
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions passwords.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
$userpass = array("asdf", "qwerty", "jkl", "abcd");
$list = array("a", "b", "c", "d");
$length = count($list);
$salt = "asdf";
$pass = false;
$username = "a";
$password = "asdf";

$key = array_search($username, $list);

if (strval($key) == null) {
echo "password does not exist";
}
else {
for ($i = 0; $i < $length; $i++) {
if ($userpass{$i} == $password) {
$index = (array_search($password, $userpass));
if ($index == $key) {
$pass = true;
}
}
}
}

echo $pass;

0 comments on commit a695107

Please sign in to comment.