This commit is contained in:
2018-04-27 21:06:19 -04:00
parent 0e4ceac959
commit 732065c7b5
7 changed files with 208 additions and 94 deletions

View File

@@ -1,20 +1,28 @@
<?php
$key = $_GET("key");
$type = $_GET("type");
$value = $_GET("value");
$userName = $_GET("username");
$password = $_GET("password");
$id = $username . $date->getTimestamp();
$
$returnData = array();
$date = new DateTime();
switch( $key ){
case "validation":
break;
case "create":
break;
default:
echo "false";
$passwordSalt = "sexfamemoney$U046qKlL$moneyfamesex";
$hashedPassword = crypt( $password, $passwordSalt );
$hashedId = crypt( $id, $passwordSalt );
/*
For login:
if (hash_equals($hashed_password, crypt($user_input, $hashed_password))) {
echo "Password verified!";
}
*/
$returnData["password"] = $hashed_password;
$returnData["id"] = $hashedId;
echo( json_encode( $returnData ) );
?>