Example #1
0
 public function testPronounceablePwd()
 {
     $is = RandomLib::pronounceablePwd(6);
     //pr($is);
     $this->assertTrue(strlen($is) === 6);
     $is = RandomLib::pronounceablePwd(11);
     //pr($is);
     $this->assertTrue(strlen($is) === 11);
 }
Example #2
0
File: Token.php Project: Jony01/LLD
 /**
  * Generator
  *
  * @param length (defaults to defaultLength)
  * @return string Key
  */
 public function generateKey($length = null)
 {
     if (empty($length)) {
         $length = $this->defaultLength;
     }
     App::uses('RandomLib', 'Tools.Lib');
     return RandomLib::generatePassword($length);
 }
Example #3
0
 /**
  * Generator
  *
  * @param length (defaults to defaultLength)
  * @return string Key
  */
 public function generateKey($length = null)
 {
     if (empty($length)) {
         $length = $this->defaultLength;
     }
     return RandomLib::generatePassword($length);
 }