Originally posted by PurpleGlowing
im not even sure on that? I was hoping it could be done on C# or C+
(im not too good with either of those programs)
Here is a way you can generate a unique key within your C# example;
string uKey = new string(Enumerable.Repeat("qwertyuiopasdfghjklzxcvbnm1234567890", 16)
.Select(s => s[rd.Next(s.Length)]).ToArray()), @"(.{4})", "$1-").Substring(0, 19).ToUpper();
Then a simple way to validate they key (but not secure) would be through pastebin. Put all the keys in a paste bin eg.
AAAA-AAAA-AAAA-AAAA
BBBB-BBBB-BBBB-BBBB
CCCC-CCCC-CCCC-CCCC
Then to validate that the key is valid (the one they entered)
string pasteUrl = "https://pastebin.com/raw.php?...";
string serialKey = "abcd-1234-dsgs-sdfs";
bool isValid = (new WebClient().DownloadString(pasteUrl).Contains(serialKey) && serialKey.length == 19);
P.s. this is really bad and wouldn't recommend it but it's a base to construct a licence system. Another way would be to create a hash and if the hash meets specific criteria then the licence is valid but then you can't control who uses it.