PEAR Manual
Prev |  | Next

# File_Passwd_Authdigest::generatePassword()

File_Passwd_Authdigest::generatePassword() -- Generate password

## Synopsis

``string File_Passwd_Authdigest::generatePassword` (string $user, string $realm, string $pass)`

## Description

Generate a password usable for "AuthDigest" authentication.

## Parameter

string `$user`

  the username

string `$realm`

  the realm the user is in

string `$pass`

  the plaintext password

## Return value

Returns string encrypted password.

## Example

Example 37-1. File_Passwd_Authdigest::generatePassword()
    require_once 'File/Passwd/Authdigest.php';
    $pass = File_Passwd_Authdigest::generatePassword('mike', 'restricted', 'secret');

## Note

This function should be called statically.

Prev | Home | Next
File_Passwd_Authdigest::userInRealm() | Up | MP3_Id