[prev in list] [next in list] [prev in thread] [next in thread]
List: msql
Subject: Re: [mSQL] password encrypted !!
From: Thomas Drillich <drillich () uniserve ! de>
Date: 1997-07-04 18:04:37
[Download RAW message or body]
fjmj@neumann.teleco.ulpgc.es sagt >>
>>
>> Hi !!
>> Sorry for my English.
>> I want to make a table which fields were "id" and "password",
>> but I'd like this last field was encrypted (like a Unix password) in
>> the table. When somebody types his id and password , Lite will encrypt
>> the password and compare id and password with the table fields.
>>
>> Does anybody have any idea about how to do it?
>>
>> Is there any function for this?
>>
>> I work in a Linux machine with mSQL-B7.1
>>
I do that with Perl (MsqlPerl)
chk_passwd($login,$passwd);
sub chk_passwd {
($login,$passwd)=@_;
$sth=$dbh->query(qq(select passwd,.... from $table where login='$login'));
return(0) unless(defined($sth));
($crypt,...)=$sth->fetchrow();
return( crypt($passw,$crypt) eq $crypt);
}
--
mit freundlichem Gru"s -- regards
Thomas Drillich <drillich@uniserve.de>
uniserveŽ Internet & Multimedia GmbH;
Sophienweg 3; Technologiezentum (MIT); D-59872 Meschede
fon +49 291 59100; fax +49 291 59102; handy +49 171 8947561
--------------------------------------------------------------------------
To remove yourself from the Mini SQL mailing list send a message containing
"unsubscribe" to msql-list-request@bunyip.com. Send a message containing
"info msql-list" to majordomo@bunyip.com for info on monthly archives of
the list. For more help, mail owner-msql-list@bunyip.com NOT the msql-list!
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic