public static function createFromData($data, $upper = false): string
    {
        if (\is_array($data) || \is_object($data)) {
            $data = serialize($data);
        }

        $hash = $upper ? strtoupper(md5($data)) : strtolower(md5($data));

        return implode(
            '-',
            [
                substr($hash, 0, 8),
                substr($hash, 8, 4),
                substr($hash, 12, 4),
                substr($hash, 16, 4),
                substr($hash, 20, 8),
            ]
        );
    }