Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $username = "Thomas";
- $pass = "kika";
- $mail = "kkonsorr@yunio.de";
- $userID = 1;
- $hashID = substr( sysHash( $username.$userID.$mail ), 0, 6 );
- function sysHash($string)
- {
- if( $cryptedString = @hash( "sha256", $string ))
- {
- return $cryptedString;
- } else
- {
- $cryptedString = md5( $string );
- return $cryptedString;
- }
- }
- $pass = sysHash($pass);
- $partOne = substr( $pass, 0, 32);
- $partTwo = substr( $pass, 32, 32);
- $pass = $partOne.'['.$hashID.']'.$partTwo;
- echo $pass;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement