public function hashPassword($password, $strategyIdentifier = 'default')
    {
        /** @var $passwordHashingStrategy PasswordHashingStrategyInterface */
        list($passwordHashingStrategy, $strategyIdentifier) = $this->getPasswordHashingStrategyAndIdentifier($strategyIdentifier);
        $hashedPasswordAndSalt = $passwordHashingStrategy->hashPassword($password, $this->getEncryptionKey());
        return $strategyIdentifier . '=>' . $hashedPasswordAndSalt;
    }
public function hashPassword($password, $strategyIdentifier = 'default')
    {
        /** @var $passwordHashingStrategy PasswordHashingStrategyInterface */
        list($passwordHashingStrategy, $strategyIdentifier) = $this->getPasswordHashingStrategyAndIdentifier($strategyIdentifier);
        $hashedPasswordAndSalt = $passwordHashingStrategy->hashPassword($password, $this->getEncryptionKey());
        return $strategyIdentifier . '=>' . $hashedPasswordAndSalt;
    }
public function hashPassword ( $ password , $ strategyIdentifier = 'default' ) { /** @var $passwordHashingStrategy PasswordHashingStrategyInterface */ list ( $ passwordHashingStrategy , $ strategyIdentifier ) = $ this -> getPasswordHashingStrategyAndIdentifier ( $ strategyIdentifier ) ; $ hashedPasswordAndSalt = $ passwordHashingStrategy -> hashPassword ( $ password , $ this -> getEncryptionKey ( ) ) ; return $ strategyIdentifier . '=>' . $ hashedPasswordAndSalt ; }
Hash a password using the configured password hashing strategy

@param string $password The cleartext password
@param string $strategyIdentifier An identifier for a configured strategy, uses default strategy if not specified
@return string A hashed password with salt (if used)
@api
Hash a password using the configured password hashing strategy