using System;
public class Program
{
public static void Main()
byte[] key = new byte[4];
var rng = System.Security.Cryptography.RandomNumberGenerator.Create();
rng.GetBytes(key);
Console.WriteLine(Convert.ToBase64String(key).Trim('='));
}