using System.Security.Cryptography;
using System.Collections.Generic;
using Microsoft.AspNetCore.WebUtilities;
public static void Main()
List<string> lst = new List<string>();
for(int i =0; i <= 500; i++)
string link = GetLinkId();
Console.WriteLine("Duplicate found! " + link );
public static string GetLinkId()
using (RNGCryptoServiceProvider rngCryptoServiceProvider = new RNGCryptoServiceProvider())
byte[] randomBytes = new byte[4];
rngCryptoServiceProvider.GetBytes(randomBytes);
return WebEncoders.Base64UrlEncode(randomBytes);