File_Passwd::staticAuth()

File_Passwd::staticAuth() -- Fast authentication

Synopsis

Описание

Static user autentication.

Though this approach should be reasonable fast, it is NOT with APR compatible MD5 encryption used for htpasswd style password files encrypted in MD5.

Generating one MD5 password takes about 0.25 seconds!

Depending on $type, $opt should be:

Параметр

string $type

Unix, Cvs, Smb, Authbasic or Authdigest

string $file

path to passwd file

string $user

the user to authenticate

string $pass

the plaintext password

mixed $opt

  • Smb:

    nt | lm

  • Unix:

    des | md5

  • Authbasic:

    des | sha | md5

  • Authdigest:

    the realm the user is in

  • Cvs:

    n/a (empty)

  • Custom:

    array of 2 elements: encryption function and delimiter

Возвращаемое значение

Returns TRUE if authenticated, FALSE if not, or PEAR_Error on failure.

Заметка

Эта функция должна вызываться статически.

    Поддержать сайт на родительском проекте КГБ