using System.Security.Cryptography;

namespace TrackQrApi.Features.Links.Common;

public static class SlugGenerator
{
    private const string Chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
    private const int DefaultLength = 7;

    public static string Generate(int length = DefaultLength)
    {
        return RandomNumberGenerator.GetString(Chars, length);
    }
}