src/Password/SmfPassword.php
public function hash($password) {
        $salt = base64_encode(openssl_random_pseudo_bytes(12));
        $hash = sha1(strtolower($salt).$password);

        return $hash.'$'.$salt;
    }
public function hash($password) {
        $salt = base64_encode(openssl_random_pseudo_bytes(12));
        $hash = sha1(strtolower($salt).$password);

        return $hash.'$'.$salt;
    }
Hashes a plaintext password.

Although smf uses the username as salt, this hashing algorithm generates a random salt.

@param string $password The password to hash.
@return string Returns the hashed password.