explicit use of std::vector instead of buffer/Buffer
There were several scoped 'using buffer = std::vector<uint8_t>;' in
header files. This consolidates the code base to use
std::vector<uint8_t> instead of buffer or Buffer. This makes the code
easier to read and debug.
Change-Id: I918a0f6ca9b8e4b9d331175dccff45cbf4c8379d
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
diff --git a/auth_algo.hpp b/auth_algo.hpp
index 2c3b0da..997e2c9 100644
--- a/auth_algo.hpp
+++ b/auth_algo.hpp
@@ -74,7 +74,7 @@
* needs to be set before this operation.
*/
std::vector<uint8_t> virtual generateHMAC(
- std::vector<uint8_t>& input) const = 0;
+ const std::vector<uint8_t>& input) const = 0;
/**
* @brief Generate the Integrity Check Value
@@ -90,7 +90,7 @@
* hash operation needs to be set before this operation.
*/
std::vector<uint8_t> virtual generateICV(
- std::vector<uint8_t>& input) const = 0;
+ const std::vector<uint8_t>& input) const = 0;
// User Key is hardcoded to PASSW0RD till the IPMI User account
// management is in place.
@@ -150,11 +150,11 @@
AlgoSHA1(AlgoSHA1&&) = default;
AlgoSHA1& operator=(AlgoSHA1&&) = default;
- std::vector<uint8_t> generateHMAC(std::vector<uint8_t>& input) const
- override;
+ std::vector<uint8_t> generateHMAC(
+ const std::vector<uint8_t>& input) const override;
- std::vector<uint8_t> generateICV(std::vector<uint8_t>& input) const
- override;
+ std::vector<uint8_t> generateICV(
+ const std::vector<uint8_t>& input) const override;
};
}// namespace auth