1.. include:: ../../Includes.txt
2
3=================================================
4Deprecation: #94309 - GeneralUtility::stdAuthCode
5=================================================
6
7See :issue:`94309`
8
9Description
10===========
11
12The method :php:`\TYPO3\CMS\Core\Utility\GeneralUtility::stdAuthCode()`
13has not been used within the Core since at least v9. It internally fiddles
14with the `encryptionKey` while using :php:`md5()`. Furthermore, the default
15length of 8 chars could easily lead to hash collisions. The TYPO3 Core already
16provides :php:`\TYPO3\CMS\Core\Utility\GeneralUtility::hmac()` for such
17purposes, which is using `sha1` with a length of 40. Therefore,
18:php:`stdAuthCode()` has been deprecated and will be removed in TYPO3 v12.
19
20Impact
21======
22
23Calling the method will trigger a PHP :php:`E_USER_DEPRECATED` error.
24
25Affected Installations
26======================
27
28All TYPO3 installations calling this method in custom code. The extension
29scanner will find all usages as strong match.
30
31Migration
32=========
33
34Replace all usages of the method in custom extension code by either using
35:php:`\TYPO3\CMS\Core\Utility\GeneralUtility::hmac()` or by a custom
36implementation.
37
38.. index:: PHP-API, FullyScanned, ext:core
39