To generate a random password for the user as per his requirements. Which inturn will help to protect him from dictionary attack.
(1) User can control which character set he wants to include in the password.
(2) User can control the length of the password.
(3) Generates the password till the user is not satisfied with the result.