Log in
Model

HashGenerator

Magento\Store\Model\StoreSwitcher\HashGenerator

What it does

This class generates and validates secure one-time tokens (hashes) used when customers switch between different store views in Magento 2.

It creates a time-sensitive signature that includes customer ID, timestamp, and store code to ensure secure store switching.

The class is deprecated and developers should use RedirectDataGenerator and RedirectDataValidator instead.

Public Methods

  • generateHash()
  • validateHash()