Esempio n. 1
0
 /**
  * @param $password
  * @param $begin
  * @param $end
  * @param $token
  * @param array $params
  */
 public function __construct($password, $begin, $end, $token, $params = array())
 {
     parent::__construct($password, $begin, $end, $token);
     $this->pattern = 'sequence';
     if (!empty($params)) {
         $this->sequenceName = isset($params['sequenceName']) ? $params['sequenceName'] : NULL;
         $this->sequenceSpace = isset($params['sequenceSpace']) ? $params['sequenceSpace'] : NULL;
         $this->ascending = isset($params['ascending']) ? $params['ascending'] : NULL;
     }
 }
Esempio n. 2
0
 /**
  * @param $password
  * @param $begin
  * @param $end
  * @param $token
  * @param array $params
  */
 public function __construct($password, $begin, $end, $token, $params = array())
 {
     parent::__construct($password, $begin, $end, $token);
     $this->pattern = 'spatial';
     $this->graph = $params['graph'];
     if (!empty($params)) {
         $this->shiftedCount = isset($params['shifted_count']) ? $params['shifted_count'] : NULL;
         $this->turns = isset($params['turns']) ? $params['turns'] : NULL;
     }
     // Preset properties since adjacency graph is constant for qwerty keyboard and keypad.
     $this->keyboardStartingPos = 94;
     $this->keypadStartingPos = 15;
     $this->keyboardAvgDegree = 432 / 94;
     $this->keypadAvgDegree = 76 / 15;
 }
Esempio n. 3
0
 /**
  * @param $password
  * @param $begin
  * @param $end
  * @param $token
  */
 public function __construct($password, $begin, $end, $token)
 {
     parent::__construct($password, $begin, $end, $token);
     $this->pattern = 'year';
 }
Esempio n. 4
0
 /**
  * @param $password
  * @param $begin
  * @param $end
  * @param $token
  */
 public function __construct($password, $begin, $end, $token)
 {
     parent::__construct($password, $begin, $end, $token);
     $this->zxcvbn_matcher = new ZxcvbnDigitMatch($password, $begin, $end, $token);
 }
Esempio n. 5
0
 /**
  * @param $password
  * @param $begin
  * @param $end
  * @param $token
  * @param $cardinality
  */
 public function __construct($password, $begin, $end, $token, $cardinality = NULL)
 {
     parent::__construct($password, $begin, $end, $token);
     $this->zxcvbn_matcher = new ZxcvbnBruteforce($password, $begin, $end, $token);
     $this->pattern = 'bruteforce';
 }
Esempio n. 6
0
 /**
  * @param $password
  * @param $begin
  * @param $end
  * @param $token
  */
 public function __construct($password, $begin, $end, $token, $char)
 {
     parent::__construct($password, $begin, $end, $token);
     $this->pattern = 'repeat';
     $this->repeatedChar = $char;
 }