質問編集履歴
1
誤字訂正
test
CHANGED
File without changes
|
test
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
事前に登録してハッシュ化したPASSWORDとログイン時の生PASSWORDを
|
16
16
|
|
17
|
-
password_ver
|
17
|
+
password_verify()で比較しようとしてもfaultになります。
|
18
18
|
|
19
19
|
|
20
20
|
|
@@ -26,15 +26,15 @@
|
|
26
26
|
|
27
27
|
```ここに言語名を入力
|
28
28
|
|
29
|
-
$passwd = $_POST['passwd'];
|
29
|
+
$passwd = $_POST['passwd'];//passはxyz123
|
30
30
|
|
31
31
|
(中略)
|
32
32
|
|
33
|
-
$hash = password_hash($passwd , PASSWORD_DEFAULT);
|
33
|
+
$hash = password_hash($passwd , PASSWORD_DEFAULT);//hashを作成
|
34
34
|
|
35
35
|
(中略)
|
36
36
|
|
37
|
-
$query = "INSERT INTO id (email , passwd) VALUES ('$id','$hash')";
|
37
|
+
$query = "INSERT INTO id (email , passwd) VALUES ('$id','$hash')";//DBに登録
|
38
38
|
|
39
39
|
・
|
40
40
|
|
@@ -66,7 +66,7 @@
|
|
66
66
|
|
67
67
|
### 試したこと
|
68
68
|
|
69
|
-
$hash_pass = '$2y$10$/GA8dDZh1gFD9yVJFl48eu3gDFuot5bpnRrRNb78jt52SaazbY55C';
|
69
|
+
$hash_pass = '$2y$10$/GA8dDZh1gFD9yVJFl48eu3gDFuot5bpnRrRNb78jt52SaazbY55C';//最初にxyz123で登録したときのハッシュ
|
70
70
|
|
71
71
|
$correct_password = 'abc123'; //
|
72
72
|
|