public function create_key($length) { if (function_exists('random_bytes')) { return random_bytes((int) $length); } return $this->_driver === 'mcrypt' ? mcrypt_create_iv($length, MCRYPT_DEV_URANDOM) : openssl_random_pseudo_bytes($length); }