Review main Merged

80394[FEATURE] Introduce class to generate/validate HMAC hashes

Torben Hansen CR +2 V +2 Hard +323 −0 updated 01/23/24, 17:18

Commit message

The `GeneralUtility::hmac()` function is used in several places
to create HMAC hashes for a given string and optional additional
secret.

Extbase has the class `HashService`, which also provides the
ability to create a HMAC for a given string, but without the
possibility to add an additional secret. The missing possibility
to use an additional secret is suboptimal in terms of security,
since generated HMAC hashes will be equal for the same input
in different contexts.

This change introduces a new class, which combines the
functionality of `GeneralUtility::hmac()` and Extbase
`HashService` but with the requirement, that an additional
secret is always mandatory.

The class will be used in follow up patches, where
`GeneralUtility::hmac()` and Extbase `HashService` will be
deprecated.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 6