public function tokenize($iv, $string = '')
    {
        if (empty($string)) {
            $string = $this->random_string();
        }

        return openssl_encrypt($string, 'AES-256-CBC', $this->_config->get('token'), 0, $iv);
    }
public function tokenize($iv, $string = '')
    {
        if (empty($string)) {
            $string = $this->random_string();
        }

        return openssl_encrypt($string, 'AES-256-CBC', $this->_config->get('token'), 0, $iv);
    }
public function tokenize ( $ iv , $ string = '' ) { if ( empty ( $ string ) ) { $ string = $ this -> random_string ( ) ; } return openssl_encrypt ( $ string , 'AES-256-CBC' , $ this -> _config -> get ( 'token' ) , 0 , $ iv ) ; }
Generate a token using OpenSSL extensions.

@param string $iv
@param string $string

@return string
Generate a token using OpenSSL extensions .