Since v1.7.0, Consenta signs every consent cookie with real HMAC-SHA256 and the WordPress AUTH_KEY. Server-side verification via hash_equals() makes timing attacks impossible — unsigned cookies are consistently rejected.
14-day money-back · Cancel anytime · GDPR-compliant · Local in WordPress
An HMAC (Hash-based Message Authentication Code) is a cryptographic method that ensures data integrity. Since Consenta v1.7.0, every consent cookie is signed with real HMAC-SHA256 — using the WordPress AUTH_KEY as the secret key. If the cookie is tampered with in the browser — e.g. to unlock blocked categories — the server detects the invalid signature via hash_equals() and discards the cookie. Unsigned cookies are rejected entirely. The user must consent again. Note: The previous djb2-based signature from v1.6.x is only accepted as a legacy fallback for migrating existing cookies and is considered deprecated.
Since v1.7.0, real HMAC-SHA256 is used with the WordPress AUTH_KEY. The secret key is unique per WordPress installation — only this server can create valid signatures.
Signature verification uses hash_equals() instead of direct string comparison. This makes timing attacks — where an attacker could infer the key by measuring response times — impossible.
Cookies without a valid HMAC-SHA256 signature are consistently rejected since v1.7.0. Only the legacy fallback for djb2-signed cookies from v1.6.x is still accepted for migration.
When tampering is detected or the signature is invalid, the cookie is deleted and the consent dialog is shown again. The user must give their consent anew.
The consent data in the cookie is protected against any tampering by the HMAC signature. Changing even a single character immediately invalidates the signature.
Existing djb2-signed cookies from v1.6.x are recognized as legacy fallback during migration and automatically replaced by new HMAC-SHA256 cookies on the next consent.
HMAC-SHA256 signing is active by default — since v1.7.0 with real HMAC and WordPress AUTH_KEY. You don't need to configure anything.
When the user gives consent, the cookie is signed with real HMAC-SHA256. The WordPress AUTH_KEY serves as the secret key.
On every page load, the server checks the signature via hash_equals(). Unsigned or tampered cookies are rejected, the consent dialog is shown again.
Cancel anytime
Cancel anytime · 14-day money back
Cancel anytime · 14-day money back
HMAC-SHA256 · WordPress AUTH_KEY · hash_equals() · Timing-attack-safe · Unsigned cookies rejected · GDPR-compliant
14-day money-back guarantee · Cancel anytime · Available in 34 languages