PHP Classes

PHP Password Validation: Generate and validate passwords based in rules

Recommend this page to a friend!
  Info   View files Example   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 552 All time: 5,460 This week: 201Up
Version License PHP version Categories
password-validation 1.0.1GNU Lesser Genera...5.3PHP 5, Text processing, Validation
Description Author

This class can generate and validate passwords based in rules.

It can generate a random password with a given length that match specified rules.

The rules can determine the number of letters, capital letters, numbers and symbols that the password must contain.

The class can also take a given password and validate it determining if it satisfy the specified rules.

Picture of Igor Zaporozhets
  Performance   Level  
Name: Igor Zaporozhets <contact>
Classes: 1 package by
Country: Ukraine Ukraine
Age: 53
All time rank: 314151 in Ukraine Ukraine
Week rank: 877 Up22 in Ukraine Ukraine Up

Utility class for password generation and checking.

This is utility class for password generation and checking according to custom 
password policy rules.

Password characters may include several subsets of characters: letters (latin and utf-8 as well),
digits, symbols. This sets of characters are fully customizable as well as other
password generation configuration params: min_length, letters_count, capitals_count,
numbers_count, symbols_count.

Default password policy check rule is min_length. Another custom ones may be added
to class instance by means of regular expressions. See unit test file for usage
Unit test provided in ../tests/ directory.
Short usage example provided in ../tests/example.php file. Also see unit test file
for possible configuration values

Public methods usage: see appropriate doc comment.
  Files folder image Files  
File Role Description
Files folder imagetests (2 files)
Plain text file Password.php Class Main class
Accessible without login Plain text file readme.txt Doc. read me file

  Files folder image Files  /  tests  
File Role Description
  Accessible without login Plain text file PasswordTest.php Test Test File
  Accessible without login Plain text file example.php Example Short example usage

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:5,460
This week:201Up
User Comments (1)
Thats a good class ;-)
8 years ago (Josť Filipe Lopes Santos)
For more information send a message to info at phpclasses dot org.