From da147b8fc15a6f18308bdbbb128dc8f1ebd3eab1 Mon Sep 17 00:00:00 2001
From: rtherville <romain.therville@inra.fr>
Date: Thu, 6 May 2021 11:34:24 +0200
Subject: [PATCH] Update to utils.php

The path to the PasswordHashFactory class has been updated with the new
typo3 version. This commit fixes the hash_password() function.

Issue#205
---
 ui/nG6/lib/class.tx_nG6_utils.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ui/nG6/lib/class.tx_nG6_utils.php b/ui/nG6/lib/class.tx_nG6_utils.php
index 643149883..62ac942b6 100644
--- a/ui/nG6/lib/class.tx_nG6_utils.php
+++ b/ui/nG6/lib/class.tx_nG6_utils.php
@@ -29,6 +29,7 @@
 
 //require_once(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('saltedpasswords').'/classes/salts/class.tx_saltedpasswords_salts_factory.php');
 
+
 class tx_nG6_utils {
 
 	/**
@@ -298,7 +299,7 @@ $template_mail.='<p>Yours sincerely</p>
 	 * @return hashed password
 	 */    
     static function hash_password($password){
-        $hashInstance = TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(PasswordHashFactory::class)->getDefaultHashInstance('FE');
+        $hashInstance = TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(TYPO3\CMS\Core\Crypto\PasswordHashing\PasswordHashFactory::class)->getDefaultHashInstance('FE');
         $hashedPassword = $hashInstance->getHashedPassword($password);
         return $hashedPassword;
     }
-- 
GitLab