Someone with MD5 passwords please try this:
#include <crypt.h>
#include <string.h>
#include <unistd.h>
int main(void)
{
char pwd[11], pwd2[11];
strncpy(pwd, crypt("FooBar", "BazQux"), 10);
pwd[10] = '\0';
strncpy(pwd2, crypt("xyzzy", "BazQux"), 10);
pwd2[10] = '\0';
if (strcmp(pwd, pwd2) == 0)
abort();
puts("Ok.");
}
Tell me if it aborts...
--
George Greer, greerga@circlemud.org | Genius may have its limitations, but
http://patches.van.ml.org/ | stupidity is not thus handicapped.
http://www.van.ml.org/CircleMUD/ | -- Elbert Hubbard
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST