src/Encryption/Sha512HashProvider.php
public function createHash($data, $salt = false)
    {
        if ($salt === false) {
            $salt = sha1(uniqid("sillystring", true) . microtime());
        }

        $raw = crypt($data, '$6$rounds=10000$' . $salt . '$');

        return $raw;
    }
public function createHash($data, $salt = false)
    {
        if ($salt === false) {
            $salt = sha1(uniqid("sillystring", true) . microtime());
        }

        $raw = crypt($data, '$6$rounds=10000$' . $salt . '$');

        return $raw;
    }
public function createHash ( $ data , $ salt = false ) { if ( $ salt === false ) { $ salt = sha1 ( uniqid ( "sillystring" , true ) . microtime ( ) ) ; } $ raw = crypt ( $ data , '$6$rounds=10000$' . $ salt . '$' ) ; return $ raw ; }
Create's a new hash of the supplied data using the optionally supplied salt.

It's expected that the salt can be randomised if not supplied. This is fact
preferable in nearly all occasions as the salt should be included in the return
value.

@param string $data
@param string|bool $salt
@return string
Create s a new hash of the supplied data using the optionally supplied salt .