public function __construct($closure = 'md5', $characters = null, $flag = Cryptography::TYPE_COMBINATION)
 {
     if (is_null($characters)) {
         $characters = Cryptography::getAllCharacters();
     }
     parent::__construct($characters, $flag);
     $this->setClosure($closure);
 }
Esempio n. 2
0
 /**
  * Shortcut or `ROT13`
  *
  * @param $str
  * @return mixed|string
  */
 public static function rot13($str)
 {
     $_this = new self(Cryptography::getAllCharacters(), 13);
     return $_this->crypt($str);
 }