Post: Help with a key generator
03-31-2016, 12:53 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Hey all, i need a little bit of help, I've been making small programs and would like to use a key for separate users.

I would like to be able to do the following:
create a key
be able to have it linked into the program so that key (and multiple) ones can be used.
and deleted if necessary. Thanks
03-31-2016, 01:43 PM #2
Thread moved to computer programming.

The following user thanked DaenerysTargy for this useful post:

PurpleGlowing
04-03-2016, 12:47 AM #3
Passion
League Champion
Originally posted by PurpleGlowing View Post
Hey all, i need a little bit of help, I've been making small programs and would like to use a key for separate users.

I would like to be able to do the following:
create a key
be able to have it linked into the program so that key (and multiple) ones can be used.
and deleted if necessary. Thanks


In what language is this going to be created?
04-03-2016, 09:16 AM #4
Originally posted by Passion View Post
In what language is this going to be created?


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)
04-15-2016, 07:00 AM #5
Toxic
former staff
Originally posted by PurpleGlowing View Post
Hey all, i need a little bit of help, I've been making small programs and would like to use a key for separate users.

I would like to be able to do the following:
create a key
be able to have it linked into the program so that key (and multiple) ones can be used.
and deleted if necessary. Thanks


Well, there are tons of ways to create the key, either a random generator, or you just make one up, but, it depends on how you are gonna access the key, what i recommend is via a MySql DB with PHP, so just google how to use tables in PHP with MySql and you should be all set :p

The following user thanked Toxic for this useful post:

PurpleGlowing
04-17-2016, 05:36 PM #6
Scouse Power
Knowledge is power
Originally posted by PurpleGlowing View Post
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.
04-17-2016, 08:04 PM #7
Thanks man. This will get me started
04-21-2016, 04:05 AM #8
Toxic
former staff
Originally posted by PurpleGlowing View Post
Thanks man. This will get me started


Can i go ahead and close this thread then :p ?
04-22-2016, 07:39 PM #9
Originally posted by Habibi
Can i go ahead and close this thread then :p ?


yeh man, go ahead. thanks
04-22-2016, 08:14 PM #10
Toxic
former staff
Originally posted by PurpleGlowing View Post
yeh man, go ahead. thanks


np, if you have any other question(s), please feel free to make another thread :p

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo