|
|
ru.cgi.perl- RU.CGI.PERL ------------------------------------------------------------------ From : yurik shestakov 2:5020/400 02 Mar 2005 01:40:44 To : Andrey Zonov Subject : Re: Hа: Perl и crypt -------------------------------------------------------------------------------- On Tue, Mar 01, 2005 at 12:44:32PM +0300, Andrey Zonov wrote: AG>> для Crypt соль = первые 2 буквы. AZ> $htpasswd = прочитан из файла с паролями; AZ> $pass = plaintext; (введён в форму) AZ> $salt = substr(0, 2); AZ> ...crypt($pass, $salt) eq $htpasswd... AZ> так? AG>> htpasswd может хранить пароли в Crypt, MD5, SHA, plain_text. AG>> сперва определись что у тебя. AZ> определился... Все равно нельзя закладывать на то, что пароль зашифрован DES-ом (у salt всего два символа). У того же htpasswd из Apache есть несколько опций для шифрования: ======================================================================== -m Use Apache's modified MD5 algorithm for passwords. Passwords encrypted with this algorithm are transportable to any platform (Windows, Unix, BeOS, et cetera) running Apache 1.3.9 or later. On Windows and TPF, this flag is the default. -d Use crypt() encryption for passwords. The default on all plat- forms but Windows and TPF. Though possibly supported by htpasswd on all platforms, it is not supported by the apache server on Windows and TPF. -s Use SHA encryption for passwords. Faciliates migration from/to Netscape servers using the LDAP Directory Interchange Format (ldif). -p Use plaintext passwords. Though htpasswd will support creation on all platforms, the apache deamon will only accept plain text passwords on Windows and TPF. ======================================================================== -- // yurik shestakov --- ifmail v.2.15dev5.3 * Origin: Unknown (2:5020/400) Вернуться к списку тем, сортированных по:
Архивное /ru.cgi.perl/10069b6f41431.html, оценка из 5, голосов 10
|