Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Generating 25 character key from a password
#1
that cant be that hard, well it can take some time. I will construct a tiny version for you:

Code:
Password: abc

Code:
' Get the key from the password
For i = 1 To Len(Password)
  If LCase$(Mid$(Password, i, 1)) = "a" Or Mid$(Password, i, 1) = "a" Then
     key = key & "a23fr"
  End If
  If LCase$(Mid$(Password, i, 1)) = "b" Or Mid$(Password, i, 1) = "b" Then
     key = key & "blt5d"
  End If
  If LCase$(Mid$(Password, i, 1)) = "c" Or Mid$(Password, i, 1) = "c" Then
     key = key & "cm48d"
  End If
etc..
Next i

Code:
The key would be: a23frblt5dcm48d

You get the idea how I would have done it Tongue Ask Verrigan, he is the perfect man for the job when it comes to these things Tongue
Reply
#2
Well i would assume that you could do something like... get the length of their password, and then start to generate one based on that. if you want it to be a repeatable key... then a mathematical formula obviously is what needs to be used.
Reply
#3
I agree with obsidian. Generate the length through the length of the password, then use a formula to fill it with stuff.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#4
Why 25 characters? I've always wished MD5 was easily definable on the length, too - god that would be handy. But with 25 characters, in base 16, that is still 16 ^ 25, or 1267650600228229401496703205376 different combination, so chances of repeats are quite small.

Anyways, what you can do is just take the MD5 hash and trim off the last 7 characters, and bam, 25. :wink: If you want to obfuscate it farther, run whatever you can/want through encryptions, combine different parts of MD5 hashes, etc.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)