Re: P2P in 15 lines
[email protected] (Brad Greenlee)
| Newsgroups | perl.fwp |
|---|---|
| Message-ID | <[email protected]> |
Right...I had a version that used crypt on the password at one point, but then realized that was silly; it was no different than just using a plaintext password that looked like gobbleygook. The original python version never actually sends the password in any form; I believe it just uses it to hash the server url, which gets passed as a parameter. The server then just hashes its own url with its password to see if they match. I suppose I could try using crypt to do the same, coming up with some way to derive a reasonable salt from the password. Any suggestions? That or someone with sufficient power could make Digest::MD5 or ::SHA1 part of the standard perl distro :-). -b Karsten Sperling wrote: > There is crypt(). However, just sending the hash of the password > instead of the pass itself doesn't change anything, as knowing the > hash is then just as good as knowing the pass. And having the server > send a challenge first would not exactly shorten the code I guess :) > > - Karsten >