Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



What is the Cracklib in PHP?

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 07-03-2010
Member
 
Join Date: Apr 2009
Posts: 732
What is the Cracklib in PHP?
  

Hello friends,
I have doing some advanced coding in PHP programming language. Now I am learning about an extensions for the cryptography. In that I am getting confused with the cracklib. Actually I don't know anything about it. So please explain me what is the Cracklib in PHP? Hope that you got the point. Please reply me as soon as possible.!!

Reply With Quote
  #2  
Old 07-03-2010
Member
 
Join Date: Jul 2006
Posts: 286
Re: What is the Cracklib in PHP?

I think that you should clear the concepts first. So, I am trying to explain you about the concepts. These functions allow you to use the CrackLib library to test the strength of a password. This strength is tested in relation to the length of the password, using uppercase or lowercase, and using the dictionary CrackLib. CrackLib also provides diagnostic messages very useful to help you in building a word going strong.
__________________
IF you hate me, please don't mention it. I know who hates me and who doesn't. You really do not have to make fun of people....
Reply With Quote
  #3  
Old 07-03-2010
Member
 
Join Date: Jul 2006
Posts: 289
Re: What is the Cracklib in PHP?

You should know that the extension PECL is not bundled with PHP. In PHP 4, the sources of this PECL extension may be found in the ext / directory within the PHP source or at the PECL link below. If you want to use these functions you must compile PHP with Crack support by using the 'configuration option with crack [= DIR]. Windows users must enable the library php_crack.dll in php.ini to use these functions. In PHP 4 this DLL resides in the extensions / directory within the PHP Windows binaries download.
__________________
Signatures reduce available bandwidth
Reply With Quote
  #4  
Old 07-03-2010
Member
 
Join Date: Aug 2006
Posts: 227
Re: What is the Cracklib in PHP?

The extension CrackLib defines a dictionary resource, returned by crack_opendict (). crack_opendict () opens the dictionary CrackLib dictionary for use with the function crack_check (). Only one dictionary can be open at once. The Parameters is the dictionary. The path to the dictionary CrackLib. The above parameter returns a resource identifier dictionary on success or FALSE on error.
__________________
I do to dead flowers what people at morgues do to dead people. Suck all the moisture out, dip them in plastic, paint them up pretty and put them in a nice frame.
Reply With Quote
  #5  
Old 07-03-2010
Member
 
Join Date: Nov 2008
Posts: 996
Re: What is the Cracklib in PHP?

I have provided you with a CrackLib example :
PHP Code:
<?php
$dictionary 
crack_opendict('/usr/local/lib/pw_dict')
     or die(
'Unable to open CrackLib dictionary');
 
$check crack_check($dictionary'gx9A2s0x');
 
$diag crack_getlastmessage();
echo 
$diag

crack_closedict($dictionary);
?>
Reply With Quote
  #6  
Old 07-03-2010
Member
 
Join Date: Apr 2008
Posts: 1,948
Re: What is the Cracklib in PHP?

You should keep in mind that if crack_check() returns TRUE, crack_getlastmessage() will return 'strong password'. crack_check ? Performs an obscure check with the given password. The following is the Description, bool crack_check ( resource $dictionary , string $password ).
The crack lib dictionary. If not specified, the last opened dictionary is used. Returns TRUE if password is strong, or FALSE otherwise. In addition to the usual checks crack can also check for similarities between the password and a username and gecos field (the gecos field normally contains the person's full name on unix systems).
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search



All times are GMT +5.5. The time now is 03:43 PM.