Пример #1
0
 /**
  * @param int $bytes
  * @return string
  */
 public function generate($bytes)
 {
     $bytes = parent::validateBytes($bytes);
     $bin = openssl_random_pseudo_bytes($bytes, $cstrong);
     $hex = bin2hex($bin);
     return $hex;
 }