Created
October 25, 2012 22:44
-
-
Save josephscott/3955939 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'PasswordHash.php'; | |
$hasher = new PasswordHash( 8, FALSE ); | |
$password1 = '012345678901234567890123456789012345678901234567890123456789012345678901'; | |
$password2 = $password1 . 'Z'; | |
echo "PASS1 : {$password1}\n"; | |
$hash1 = $hasher->HashPassword( $password1 ); | |
echo "HASH1 : {$hash1}\n"; | |
echo "PASS2 : {$password2}\n"; | |
$hash2 = $hasher->HashPassword( $password2 ); | |
echo "HASH2 : {$hash2}\n"; | |
echo "** PASS1 works with HASH2 : "; | |
if ( $hasher->CheckPassword( $password1, $hash2 ) ) { | |
echo "yes !!!!!!\n"; | |
} else { | |
echo "no\n"; | |
} | |
echo "** PASS1 length: " . strlen( $password1 ) . "\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment