I am experiencing problems with crypt/2 predicate.
Specifically, I got a "Password encryption not supported" exception. Among
other things, this makes crypt/2-based HTTP authentication unfeasible.
I am using SWI version 5.9.6 on Win32.
Any help is appreciated.
Thank you very much.
M
I think it should work fine if you use MD5 encrypted passwords, but
not using traditional Unix encryption. The docs at
http://www.swi-prolog.org/pldoc/doc_for?object=crypt%2f2
indicate how you can hash such passwords.
I'm happy to add traditional Unix passwords if you do the homework and
find me a nice plain C implementation of the hash-function with a
compatible license. If I recall well, I looked at the implementation
of crypt() in glibc, but it depended on so many other things that I
gave up. I need nice plain and portable C ...
Cheers --- Jan
With a little bit of cleanup (there are unnecessary hooks for
SHA1 and MD5 hashes as well) you might be able to use the NetBSD
implementation (or equally one from the other BSDs).
http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libcrypt/crypt.c
http://www.daemon-systems.org/man/crypt.3.html
Cheers,
-w
Thanks. That was not too hard. Of course the price is that
I have to stick one of these nasty long headers in the package
documentation and all users of products that use it must do
the same :-(
Anyway, you find it in the latest GIT of the development version.
Not sure when the next binary release will be. Generally it is
never too far away :-)
Cheers --- Jan