Пример #1
0
 public function __construct($key = null)
 {
     if ($key !== null && strlen($key) != 32) {
         // use hash in case when key length is not 32
         $key = md5($key);
     }
     parent::__construct($key);
 }
Пример #2
0
 public function __construct($key = null)
 {
     if ($key !== null && strlen($key) < 32) {
         // use hash in case when key length less than needed
         $key = md5($key);
     }
     parent::__construct($key);
 }