Commit d19b442a authored by Yann Garcia's avatar Yann Garcia
Browse files

Rename variables & parameters

parent baa1c1f4
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -23,7 +23,7 @@
        <listItem>./bin</listItem>
        <listItem>./bin</listItem>
        <listItem>./src/bin</listItem>
        <listItem>./src/bin</listItem>
        <listItem>./src/bin/asn1</listItem>
        <listItem>./src/bin/asn1</listItem>
        <listItem>C:\OpenSSL-Win64\include</listItem>
        <listItem>C:\ProgramFiles\OpenSSL-Win64\include</listItem>
        <listItem>C:\npcap-sdk-0.1\Include</listItem>
        <listItem>C:\npcap-sdk-0.1\Include</listItem>
        <listItem>/Users/yann/Documents/wireshark/cygwin64/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/include/c++</listItem>
        <listItem>/Users/yann/Documents/wireshark/cygwin64/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/include/c++</listItem>
      </preprocessorIncludes>
      </preprocessorIncludes>
+1 −0
Original line number Original line Diff line number Diff line
@@ -5,3 +5,4 @@ data/certificates/
data/v3/certificates/
data/v3/certificates/
data/v3/temp/
data/v3/temp/
data/v3/xer/
data/v3/xer/
/bin/
+4 −4
Original line number Original line Diff line number Diff line
@@ -1149,7 +1149,7 @@ namespace LibItsSecurity__Functions


  /**
  /**
   * \brief    Read the specified certificate
   * \brief    Read the specified certificate
   * \param   p_certificateId the certificate identifier
   * \param   p_certificate_id the certificate identifier
   * \param   p_certificate   the expected certificate
   * \param   p_certificate   the expected certificate
   * \return  true on success, false otherwise
   * \return  true on success, false otherwise
   */
   */
@@ -1181,7 +1181,7 @@ namespace LibItsSecurity__Functions
  
  
  /**
  /**
   * \brief    Read the specified certificate digest
   * \brief    Read the specified certificate digest
   * \param   p_certificateId the certificate identifier
   * \param   p_certificate_id the certificate identifier
   * \param   p_digest   the expected certificate
   * \param   p_digest   the expected certificate
   * \return  true on success, false otherwise
   * \return  true on success, false otherwise
   */
   */
@@ -1200,7 +1200,7 @@ namespace LibItsSecurity__Functions


  /**
  /**
   * \brief   Read the whole-hash of the certificate
   * \brief   Read the whole-hash of the certificate
   * \param   p_certificateId the certificate identifier
   * \param   p_certificate_id the certificate identifier
   * \param   p_hash   the expected certificate
   * \param   p_hash   the expected certificate
   * \return  true on success, false otherwise
   * \return  true on success, false otherwise
   */
   */
@@ -1219,7 +1219,7 @@ namespace LibItsSecurity__Functions


  /**
  /**
   * \brief    Read the private keys for the specified certificate
   * \brief    Read the private keys for the specified certificate
   * \param   p_certificateId     the keys identifier
   * \param   p_certificate_id     the keys identifier
   * \param   p_signingPrivateKey the signing private key
   * \param   p_signingPrivateKey the signing private key
   * \return  true on success, false otherwise
   * \return  true on success, false otherwise
   */
   */
+17 −1
Original line number Original line Diff line number Diff line
@@ -338,6 +338,22 @@ public:
   */
   */
  std::string trim(const std::string& p_value, const std::string& p_trim_chars = " \t");
  std::string trim(const std::string& p_value, const std::string& p_trim_chars = " \t");
    
    
  /*!
   * \brief Convert the provided string into a list of arguments
   * \param[in] p_value The string value
   * \param[in] p_separator The separator sequence to use for the spliting process
   * \return The item list
   * \code{.cc}
   *     std::string str = "This is a test for spliting a string with a white spave";
   *     std::vector<std::string> tokens = converter::get_instance().split(str, " ");
   *     std::clog << "Tokens: " << std::endl;
   *     for (auto it = tokens.begin(); it != tokens.end(); ++it) {
   *       std::clog << "   " << *it << std::endl;
   *     }
   * \endcode
   */
  std::vector<std::string> split(const std::string & p_value, const std::string& p_separator);
  
  /*!
  /*!
   * \brief Convert the provided string into a list of arguments
   * \brief Convert the provided string into a list of arguments
   * \param[in] p_value The string value
   * \param[in] p_value The string value
+15 −1
Original line number Original line Diff line number Diff line
@@ -98,6 +98,20 @@ std::string converter::trim(const std::string& str, const std::string& whitespac
  return str.substr(strBegin, strRange);
  return str.substr(strBegin, strRange);
}
}


std::vector<std::string> converter::split(const std::string & p_value, const std::string& p_separator) {
  std::vector<std::string> output;
  std::size_t current, previous = 0;
  current = p_value.find(p_separator);
  while (current != std::string::npos) {
    output.push_back(p_value.substr(previous, current - previous));
    previous = current + 1;
    current = p_value.find(p_separator, previous);
  }
  output.push_back(p_value.substr(previous, current - previous));

  return output;
}

std::vector<std::string> converter::split_arguments_line(const std::string & p_value) {
std::vector<std::string> converter::split_arguments_line(const std::string & p_value) {
  std::vector<std::string> output;
  std::vector<std::string> output;
  std::string line = trim(p_value);
  std::string line = trim(p_value);
Loading