Loading ccsrc/security/include/hmac.hh +69 −69 Original line number Diff line number Diff line Loading @@ -48,14 +48,14 @@ public: }; /*! * \fn int generate(const OCTETSTRING p_buffer, const OCTETSTRING p_secret_key, OCTETSTRING& p_hmac); * \fn int generate(const OCTETSTRING& p_buffer, const OCTETSTRING& p_secret_key, OCTETSTRING& p_hmac); * \brief Generate the HMAC of data using a secret key * \Param[in] p_buffer The data tobe hashed * \param[in] p_secret_key The secret key to be used to generate the HMAC * \param[out] p_hmac The HMAC value based of the provided data * \return 0 on success, -1 otherwise */ int generate(const OCTETSTRING p_buffer, const OCTETSTRING p_secret_key, OCTETSTRING &p_hmac); // TODO Use reference & int generate(const OCTETSTRING& p_buffer, const OCTETSTRING& p_secret_key, OCTETSTRING& p_hmac); /*! * \fn int generate(const uint8_t* p_buffer, const size_t p_buffer_length, const uint8_t* p_secret_key, const size_t p_secret_key_length, Loading ccsrc/security/src/hmac.cc +54 −54 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ #include "loggers.hh" int hmac::generate(const OCTETSTRING p_buffer, const OCTETSTRING p_secret_key, OCTETSTRING &p_hmac) { int hmac::generate(const OCTETSTRING& p_buffer, const OCTETSTRING& p_secret_key, OCTETSTRING& p_hmac) { // Sanity check if (p_buffer.lengthof() == 0) { return -1; Loading Loading
ccsrc/security/include/hmac.hh +69 −69 Original line number Diff line number Diff line Loading @@ -48,14 +48,14 @@ public: }; /*! * \fn int generate(const OCTETSTRING p_buffer, const OCTETSTRING p_secret_key, OCTETSTRING& p_hmac); * \fn int generate(const OCTETSTRING& p_buffer, const OCTETSTRING& p_secret_key, OCTETSTRING& p_hmac); * \brief Generate the HMAC of data using a secret key * \Param[in] p_buffer The data tobe hashed * \param[in] p_secret_key The secret key to be used to generate the HMAC * \param[out] p_hmac The HMAC value based of the provided data * \return 0 on success, -1 otherwise */ int generate(const OCTETSTRING p_buffer, const OCTETSTRING p_secret_key, OCTETSTRING &p_hmac); // TODO Use reference & int generate(const OCTETSTRING& p_buffer, const OCTETSTRING& p_secret_key, OCTETSTRING& p_hmac); /*! * \fn int generate(const uint8_t* p_buffer, const size_t p_buffer_length, const uint8_t* p_secret_key, const size_t p_secret_key_length, Loading
ccsrc/security/src/hmac.cc +54 −54 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ #include "loggers.hh" int hmac::generate(const OCTETSTRING p_buffer, const OCTETSTRING p_secret_key, OCTETSTRING &p_hmac) { int hmac::generate(const OCTETSTRING& p_buffer, const OCTETSTRING& p_secret_key, OCTETSTRING& p_hmac) { // Sanity check if (p_buffer.lengthof() == 0) { return -1; Loading