cvs: pear /Text_Password Password.php
| From: | Martin Jansen | Date: | Mon, 25 Oct 2004 12:33:23 +0000 |
| Subject: | cvs: pear /Text_Password Password.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-25196@lists.php.net to get a copy of this message | ||
mj Mon Oct 25 08:33:23 2004 EDT
Modified files:
/pear/Text_Password Password.php
Log:
* Added alphabetical character set.
Patch by: Aaron Wormus
http://cvs.php.net/diff.php/pear/Text_Password/Password.php?r1=1.9&r2=1.10&ty=u
Index: pear/Text_Password/Password.php
diff -u pear/Text_Password/Password.php:1.9 pear/Text_Password/Password.php:1.10
--- pear/Text_Password/Password.php:1.9 Thu Aug 26 05:49:17 2004
+++ pear/Text_Password/Password.php Mon Oct 25 08:33:22 2004
@@ -17,7 +17,7 @@
// | Olivier Vanhoucke <olivier@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Password.php,v 1.9 2004/08/26 09:49:17 mj Exp $
+// $Id: Password.php,v 1.10 2004/10/25 12:33:22 mj Exp $
//
/**
@@ -42,7 +42,7 @@
* @param string Type of password (pronounceable, unpronounceable)
* @param string Character which could be use in the
* unpronounceable password ex : 'A,B,C,D,E,F,G'
- * or numeric or alphanumeric.
+ * or numeric, alphabetical or alphanumeric.
* @return string Returns the generated password.
*/
function create($length = 10, $type = 'pronounceable', $chars = '')
@@ -71,7 +71,7 @@
* @param string Type of password (pronounceable, unpronounceable)
* @param string Character which could be use in the
* unpronounceable password ex : 'A,B,C,D,E,F,G'
- * or numeric or alphanumeric.
+ * or numeric, alphabetical or alphanumeric.
* @return array Array containing the passwords
*/
function createMultiple($number, $length = 10, $type = 'pronounceable', $chars =
'')
@@ -449,7 +449,7 @@
* @param integer Length of the password
* @param string Character which could be use in the
* unpronounceable password ex : 'ABCDEFG'
- * or numeric or alphanumeric.
+ * or numeric, alphabetical or alphanumeric.
* @return string Returns the password
*/
function _createUnpronounceable($length, $chars)
@@ -468,6 +468,11 @@
$_Text_Password_NumberOfPossibleCharacters = 62;
break;
+ case 'alphabetical':
+ $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
+ $_Text_Password_NumberOfPossibleCharacters = 52;
+ break;
+
case 'numeric':
$chars = '0123456789';
$_Text_Password_NumberOfPossibleCharacters = 10;