Esempio n. 1
0
 /**
  * @param string $plaintext_key
  * @param array $substitution_table
  */
 public function __construct($plaintext_key = '', $substitution_table = array())
 {
     if (is_string($substitution_table)) {
         $substitution_table = str_split($substitution_table);
     }
     parent::__construct($plaintext_key, array($substitution_table));
 }
Esempio n. 2
0
 /**
  * @param string $plaintext_key
  * @param null $crypt_closure
  * @param null $decrypt_closure
  */
 public function __construct($plaintext_key = '', $crypt_closure = null, $decrypt_closure = null)
 {
     parent::__construct($plaintext_key, array());
     if (!is_null($crypt_closure)) {
         $this->setCryptClosure($crypt_closure);
         if (is_null($decrypt_closure)) {
             $this->setDecryptClosure($crypt_closure);
         }
     }
     if (!is_null($decrypt_closure)) {
         $this->setDecryptClosure($decrypt_closure);
     }
 }