<?php
$inPassword = "FlashBackRules";
$HPassword1 = "$2y$10$QTh2/kupvLOH.bMxXVPWau0NabdpMBwSHOe6Jrl75EyU5olskYUQK";
$HPassword2 = "$2y$10$NzR.cmyV6oHlBqzN78uvOO8GjHmwEyXGfRkx/mFLLfUBYhzS/gE0C";
$HPassword3 = "$2y$10$A.KVa.0e1Wr00c3UMPfnv.Fo8P/W6v24nlqt0BzxElgzhzGzjwkcS";
$HPassword4 = "$2y$10$bA8E1ePVFRfCxphk1Jetz.R8QXMf02IvZ/3WjyMtgh6WrX58Hr3Xu";
$Password1 = password_hash( $inPassword ,PASSWORD_DEFAULT );
$Password2 = hash("sha512", $inPassword, FALSE);
print "\n\n";
print "\n Password hash : ".$Password1;
print "\n Sha512 Password : ". $Password2;
print "\n Check password : ".password_verify( $inPassword, $Password1);
print "\n Check password 1 : ".password_verify( $inPassword, $HPassword1);
print "\n Check password 2 : ".password_verify( $inPassword, $HPassword2);
print "\n Check password 3 : ".password_verify( $inPassword, $HPassword3);
print "\n Check password 4 : ".password_verify( $inPassword, $HPassword4);
print "\n\n";
?>
<?php
$hash = password_hash("rasmuslerdorf", PASSWORD_DEFAULT);
echo "first hash: " . $hash . "\n";
if (password_verify("rasmuslerdorf", $hash)){
echo "Valid password\n";
} else {
echo "Invalid password\n";
}
$hash = password_hash("rasmuslerdorf", PASSWORD_DEFAULT);
echo "second hash: " . $hash . "\n";
if (password_verify("rasmuslerdorf", $hash)){
echo "Valid password\n";
} else {
echo "Invalid password\n";
}
echo "and now an invalid password:\n";
if (password_verify("rasmuslerdorf1", $hash)){
echo "Valid password\n";
} else {
echo "Invalid password\n";
}
?>
first hash: $2y$10$Fus.hpwnOlSc.2kSPhVOuurpDqbC5TJYDemcp/LEs3DGCrYpWoY2m Valid password second hash: $2y$10$/gGIWnMClFyx5vRYTcFlIuBlG64hsXHxB7AnWDPKK1dnDtMrPDkA. Valid password and now an invalid password: Invalid password
<?php
$inPassword = "FlashBackRules";
$HPassword1 = "$2y$10$QTh2/kupvLOH.bMxXVPWau0NabdpMBwSHOe6Jrl75EyU5olskYUQK";
$HPassword2 = "$2y$10$NzR.cmyV6oHlBqzN78uvOO8GjHmwEyXGfRkx/mFLLfUBYhzS/gE0C";
$HPassword3 = "$2y$10$A.KVa.0e1Wr00c3UMPfnv.Fo8P/W6v24nlqt0BzxElgzhzGzjwkcS";
$HPassword4 = "$2y$10$bA8E1ePVFRfCxphk1Jetz.R8QXMf02IvZ/3WjyMtgh6WrX58Hr3Xu";
$Password1 = password_hash( $inPassword ,PASSWORD_DEFAULT );
$Password2 = hash("sha512", $inPassword, FALSE);
print "\n\n";
print "\n Password hash : ".$Password1;
print "\n Sha512 Password : ". $Password2;
print "\n Check password : ".password_verify( $inPassword, $Password1);
print "\n Check password 1 : ".password_verify( $inPassword, $HPassword1);
print "\n Check password 2 : ".password_verify( $inPassword, $HPassword2);
print "\n Check password 3 : ".password_verify( $inPassword, $HPassword3);
print "\n Check password 4 : ".password_verify( $inPassword, $HPassword4);
print "\n\n";
?>
<?php
$inPassword = "FlashBackRules";
$HPassword1 = '$2y$10$QTh2/kupvLOH.bMxXVPWau0NabdpMBwSHOe6Jrl75EyU5olskYUQK';
$HPassword2 = '$2y$10$NzR.cmyV6oHlBqzN78uvOO8GjHmwEyXGfRkx/mFLLfUBYhzS/gE0C';
$HPassword3 = '$2y$10$A.KVa.0e1Wr00c3UMPfnv.Fo8P/W6v24nlqt0BzxElgzhzGzjwkcS';
$HPassword4 = '$2y$10$bA8E1ePVFRfCxphk1Jetz.R8QXMf02IvZ/3WjyMtgh6WrX58Hr3Xu';
$Password1 = password_hash( $inPassword ,PASSWORD_DEFAULT );
$Password2 = hash("sha512", $inPassword, FALSE);
print "\n\n";
print "\n Password hash : ".$Password1;
print "\n Sha512 Password : ". $Password2;
print "\n Check password : ".(password_verify( $inPassword, $Password1) ? 'true' : 'false');
print "\n Check password 1 : ".(password_verify( "somethingElse", $HPassword1) ? 'true' : 'false');
print "\n Check password 2 : ".(password_verify( $inPassword, $HPassword2) ? 'true' : 'false');
print "\n Check password 3 : ".(password_verify( $inPassword, $HPassword3) ? 'true' : 'false');
print "\n Check password 4 : ".(password_verify( $inPassword, $HPassword4) ? 'true' : 'false');
print "\n\n";
?>
Password hash : $2y$10$bbJ6roLe5PQXeUuA7XYOL.5rI8AjA3.QBL/vDml1oqq5DcJMvQMY6 Sha512 Password : 2fb0fa5f72d8c32b208efd8efd85aa07a441eae709be9136652e18fa827ddc3e5f8133bcf909b4b890ad7ad06edb068d6ee1 91d2d290ebe91f90a4c1dfbb2ed3 Check password : true Check password 1 : false Check password 2 : true Check password 3 : true Check password 4 : true
<?php
$inPassword = "FlashBackRules";
$HPassword1 = '$2y$10$QTh2/kupvLOH.bMxXVPWau0NabdpMBwSHOe6Jrl75EyU5olskYUQK';
$HPassword2 = '$2y$10$NzR.cmyV6oHlBqzN78uvOO8GjHmwEyXGfRkx/mFLLfUBYhzS/gE0C';
$HPassword3 = '$2y$10$A.KVa.0e1Wr00c3UMPfnv.Fo8P/W6v24nlqt0BzxElgzhzGzjwkcS';
$HPassword4 = '$2y$10$bA8E1ePVFRfCxphk1Jetz.R8QXMf02IvZ/3WjyMtgh6WrX58Hr3Xu';
$Password1 = password_hash( $inPassword ,PASSWORD_DEFAULT );
$Password2 = hash("sha512", $inPassword, FALSE);
print "\n\n";
print "\n Password hash : ".$Password1;
print "\n Sha512 Password : ". $Password2;
print "\n Check password : ".(password_verify( $inPassword, $Password1) ? 'true' : 'false');
print "\n Check password 1 : ".(password_verify( "somethingElse", $HPassword1) ? 'true' : 'false');
print "\n Check password 2 : ".(password_verify( $inPassword, $HPassword2) ? 'true' : 'false');
print "\n Check password 3 : ".(password_verify( $inPassword, $HPassword3) ? 'true' : 'false');
print "\n Check password 4 : ".(password_verify( $inPassword, $HPassword4) ? 'true' : 'false');
print "\n\n";
?>
Password hash : $2y$10$bbJ6roLe5PQXeUuA7XYOL.5rI8AjA3.QBL/vDml1oqq5DcJMvQMY6 Sha512 Password : 2fb0fa5f72d8c32b208efd8efd85aa07a441eae709be9136652e18fa827ddc3e5f8133bcf909b4b890ad7ad06edb068d6ee1 91d2d290ebe91f90a4c1dfbb2ed3 Check password : true Check password 1 : false Check password 2 : true Check password 3 : true Check password 4 : true
Du måste vara medlem för att kunna kommentera
Flashback finansieras genom donationer från våra medlemmar och besökare. Det är med hjälp av dig vi kan fortsätta erbjuda en fri samhällsdebatt. Tack för ditt stöd!
Swish: 123 536 99 96 Bankgiro: 211-4106