in reply to Re^2: encryption confusion
in thread encryption confusion
gaal is right, but there should be an emphasis on some function of time. Since only the first two characters are used for the salt, if you just pass in time, you'll always have "10" as your salt (at least until Nov. 9 of this year, when it hits 11). One quickie way to do it is to use reverse time or even reverse rand time. If you're really paranoiod, take a look at srand or Math::TrulyRandom.
Update: actually, big "doh" here...passing in a number as your salt only gives you 100 possible salts. tachyon's suggestion below is actually the way to do it (and they way I've done it in the past, which is why I'm kicking myself). You should still read over srand, though.
-b
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: encryption confusion
by gaal (Parson) on Aug 20, 2004 at 20:52 UTC |