yii\web\AssetManager::hash PHP Method

hash() protected method

Generate a CRC32 hash for the directory path. Collisions are higher than MD5 but generates a much smaller hash string.
protected hash ( string $path ) : string
$path string string to be hashed.
return string hashed string.
    protected function hash($path)
    {
        if (is_callable($this->hashCallback)) {
            return call_user_func($this->hashCallback, $path);
        }
        $path = (is_file($path) ? dirname($path) : $path) . filemtime($path);
        return sprintf('%x', crc32($path . Yii::getVersion()));
    }