| Mirage Source http://web.miragesource.net/forums/ |
|
| Generating 25 character key from a password http://web.miragesource.net/forums/viewtopic.php?f=201&t=1426 |
Page 1 of 11 |
| Author: | Lea [ Thu Mar 01, 2007 2:39 pm ] |
| Post subject: | Generating 25 character key from a password |
Hi guys, I need to generate a 25 character key from a password The password may be any ASCII character, and must be greater than 5 characters in length. The key must be all letters and numbers, and exactly 25 characters in length I want it to be repeatable, if I type in this password I get this key again. Has anyone done this or have any pointers for me? Thanks, Dave |
|
| Author: | William [ Thu Mar 01, 2007 2:57 pm ] |
| Post subject: | |
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 |
|
| Author: | Obsidian [ Thu Mar 01, 2007 3:09 pm ] |
| Post subject: | |
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. |
|
| Author: | Robin [ Thu Mar 01, 2007 4:23 pm ] |
| Post subject: | |
I agree with obsidian. Generate the length through the length of the password, then use a formula to fill it with stuff. |
|
| Author: | Lea [ Thu Mar 01, 2007 4:43 pm ] |
| Post subject: | |
Well, I don't want it reversible either. I want something like an MD5 with 25 characters. |
|
| Author: | Spodi [ Thu Mar 01, 2007 6:28 pm ] |
| Post subject: | |
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. |
|
| Author: | Lea [ Fri Mar 02, 2007 12:55 am ] |
| Post subject: | |
Ok I decided what I am going to do. I need 4 different 25 character keys, so I am going to generate 5 MD5 values, doing some boolean modification between each one, and then take 5 characters from each one. |
|
| Author: | wanai [ Wed May 25, 2022 3:01 am ] |
| Post subject: | Re: Generating 25 character key from a password |
XIII |
|
| Author: | wanai [ Wed May 25, 2022 3:02 am ] |
| Post subject: | Re: Generating 25 character key from a password |
181.7 |
|
| Author: | wanai [ Wed May 25, 2022 3:03 am ] |
| Post subject: | Re: Generating 25 character key from a password |
CHAP |
|
| Author: | wanai [ Wed May 25, 2022 3:04 am ] |
| Post subject: | Re: Generating 25 character key from a password |
easi |
|
| Author: | wanai [ Wed May 25, 2022 3:05 am ] |
| Post subject: | Re: Generating 25 character key from a password |
Chri |
|
| Author: | wanai [ Wed May 25, 2022 3:06 am ] |
| Post subject: | Re: Generating 25 character key from a password |
Albe |
|
| Author: | wanai [ Wed May 25, 2022 3:08 am ] |
| Post subject: | Re: Generating 25 character key from a password |
Tang |
|
| Author: | wanai [ Wed May 25, 2022 3:09 am ] |
| Post subject: | Re: Generating 25 character key from a password |
XVII |
|
| Author: | wanai [ Wed May 25, 2022 3:10 am ] |
| Post subject: | Re: Generating 25 character key from a password |
Jose |
|
| Author: | wanai [ Wed May 25, 2022 3:11 am ] |
| Post subject: | Re: Generating 25 character key from a password |
Agua |
|
| Author: | wanai [ Wed May 25, 2022 3:12 am ] |
| Post subject: | Re: Generating 25 character key from a password |
Alla |
|
| Author: | wanai [ Wed May 25, 2022 3:13 am ] |
| Post subject: | Re: Generating 25 character key from a password |
Atla |
|
| Author: | wanai [ Wed May 25, 2022 3:14 am ] |
| Post subject: | Re: Generating 25 character key from a password |
Tesc |
|
| Author: | wanai [ Wed May 25, 2022 3:15 am ] |
| Post subject: | Re: Generating 25 character key from a password |
XVII |
|
| Author: | wanai [ Wed May 25, 2022 3:16 am ] |
| Post subject: | Re: Generating 25 character key from a password |
Auro |
|
| Page 1 of 11 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|