Aug 16, 2010 01:17 PM
(This post was last modified: Aug 16, 2010 01:22 PM by ubbelol.)
Right so I saw nathans post on a random generation of serials, so I decided to whip up a very simple and small snippet to generate fixed length serials based on input (which means that the serial generated will always be the same if the input is the same).
This can be quite useful for logins system if used right, but please note that if you're gonna use this snippet for your logins PLEASE put some other encryption on as well or else people will easily crack the serial as this isn't that secure, it's just to show you the basic idea.
Right, so what better way of doing this than using a hash? I decided to go with SHA1, I know it has a fixed length of 40 characters so it's easy making a serial divided into 4 pieces splitted by a '-'.
So here's a little preview:
[IMG]http://i350.photobucket.com/albums/q408/ubbe12/serial.gif[/IMG]
And because the source is so awesome i'm putting it in a $hareCash link.
Nope, never do that.
[IMG]http://i350.photobucket.com/albums/q408/ubbe12/wutwut.png[/IMG]
Have fun and kids, please make something useful out of it. 😉
This can be quite useful for logins system if used right, but please note that if you're gonna use this snippet for your logins PLEASE put some other encryption on as well or else people will easily crack the serial as this isn't that secure, it's just to show you the basic idea.
Right, so what better way of doing this than using a hash? I decided to go with SHA1, I know it has a fixed length of 40 characters so it's easy making a serial divided into 4 pieces splitted by a '-'.
So here's a little preview:
[IMG]http://i350.photobucket.com/albums/q408/ubbe12/serial.gif[/IMG]
And because the source is so awesome i'm putting it in a $hareCash link.
Nope, never do that.
[IMG]http://i350.photobucket.com/albums/q408/ubbe12/wutwut.png[/IMG]
Have fun and kids, please make something useful out of it. 😉
Probably coding some useless shit.

