src/Security/RateLimiting/RateLimit.php
protected function getEntityId($blockType, $config, $params = array())
    {
        $entityId = null;
        if ($blockType === "account" && isset($params["name"])) {
            $entityId = md5($params["name"]);
        } elseif ($blockType === "email" && isset($params["email"])) {
            $entityId = md5($params["email"]);
        } elseif ($blockType === "ip") {
            $entityId = $this->getIp($config);
        }
        return $entityId;
    }
protected function getEntityId($blockType, $config, $params = array())
    {
        $entityId = null;
        if ($blockType === "account" && isset($params["name"])) {
            $entityId = md5($params["name"]);
        } elseif ($blockType === "email" && isset($params["email"])) {
            $entityId = md5($params["email"]);
        } elseif ($blockType === "ip") {
            $entityId = $this->getIp($config);
        }
        return $entityId;
    }
Gets an entity identifier

Returns a string that will identify the entity
in the rate limiting process. It can be a hash of a username/email,
or IP subnet of a size defined by the configuration.

md5 is applied on a user-supplied input (email, username),
collisions or reversibility do not present security concerns.

@param string $blockType Blocking type (account,email,ip)
@param array $config Configuration array for the specific rate limit
@param array $params Additional parameters from the action() call
@return string Entity id