Upload files to "/"
This commit is contained in:
29
Untitled-1.php
Normal file
29
Untitled-1.php
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
<?php
|
||||
// See the password_hash() example to see where this came from.
|
||||
|
||||
//$bcrypt-sha256$v=2,t=2b,r=12$GSESZguIOkfLQom0VDQTae$OtF.jWHaZLjgkfe/MvQbhHujHg6w8qG
|
||||
$org = 'FooBar2023';
|
||||
|
||||
$hash = 'OtF.jWHaZLjgkfe/MvQbhHujHg6w8qG';
|
||||
// '12$VHOXJuFmSdf6FUyU7Ce34e$iufdzMTOyg.PapK8DQAauBMQfekpzXO'
|
||||
|
||||
//$hash = '$2y$07$BCryptRequires22Chrcte/VlQH0piJtjXl.0t1XkA8pw9dMXTpOq';
|
||||
$newhash = '$2y$12$T3RGLmpXSGFaTGpna2ZlL012UWJoSHVqSGc2dzhxRw==';
|
||||
|
||||
$opt = ['cost' => 12];
|
||||
|
||||
$raw_hash = hash("sha256", $hash, true);
|
||||
echo $raw_hash; echo "\r\n";
|
||||
$b64_hash = base64_encode($hash);
|
||||
echo $b64_hash; echo "\r\n";
|
||||
|
||||
echo password_hash($org, PASSWORD_BCRYPT, $opt);
|
||||
echo "\r\n";
|
||||
|
||||
if (password_verify($org, $newhash)) {
|
||||
echo 'Password is valid!';
|
||||
} else {
|
||||
echo 'Invalid password.';
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user