Password Gen
Blitz3D Forums/Blitz3D Beginners Area/Password Gen
| ||
hi, i use this code to generate passwords:For k = 0 To 8 abc$ = Rand(1, 4) Select abc$ Case 1 a% = Rand(65, 90) genPass$ = genPass$ + Chr$(a%) Case 2 b% = Rand(97, 122) genPass$ = genPass$ + Chr$(b%) Case 3 c% = Rand(0, 9) d$ = Str(c%) genPass$ = genPass$ + d$ Case 4 c% = Rand(0, 9) d$ = Str(c%) genPass$ = genPass$ + d$ End Select Next Notify genPass$ but it keeps coming up as "f113p6258". I cant work out why it does that cause everything looks random to me. :S Can anyone help? Thanks |
| ||
You need to set the randomizer seed for more true random numbersSeedRnd (MilliSecs()) Read this: http://www.blitzbasic.com/bpdocs/command.php?name=SeedRnd&ref=2d_cat |
| ||
that is true |
| ||
ok thanks |
| ||
Why don't you use a MD5 hash. I know there is an Md5 algorythm somewhere for Blitz ! |
| ||
md5 is user for encrypting not generating.... |
| ||
i'm happy to see that you're a security specialist. |
| ||
I did last week it is now super fast |
| ||
@Chi3f Stadi>im not realy :P But look the kid is talking about password generation. And if you generate a random string and then encrypt it with the md5 algo that would not be a problem. But if you encrypt the same string the md5 hash would also be the same md5 $. So whats the use. All he wanted was to create something that generates passwords, if after that he chooses to create md5's from those passwords so be it. But that doesnt mean it's better. A good wordlist and a lil john the ripper could easely crack it.... ;) This is not realy helping the kid issit.... |
| ||
ok, call me a noob, but what is an Md5? |
| ||
I guess it's an encryption algorythm ;) |
| ||
MD5 is a Message Digest algorithm.... it takes a long string as input (say a few paragraphs) and generates a 'unique' key that cannot be reverse engineered back to the original input. this ... http://www.faqs.org/rfcs/rfc1321.html ... is a bit techy, but is reasonably definitive. |