summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--auth_algo.cpp1
-rw-r--r--auth_algo.hpp2
2 files changed, 3 insertions, 0 deletions
diff --git a/auth_algo.cpp b/auth_algo.cpp
index d2acebf..b71636b 100644
--- a/auth_algo.cpp
+++ b/auth_algo.cpp
@@ -37,6 +37,7 @@ std::vector<uint8_t> AlgoSHA1::generateICV(std::vector<uint8_t>& input) const
std::cerr << "Generate Session Integrity Key failed\n";
output.resize(0);
}
+ output.resize(integrityCheckValueLength);
return output;
}
diff --git a/auth_algo.hpp b/auth_algo.hpp
index cf5ccfe..2c3b0da 100644
--- a/auth_algo.hpp
+++ b/auth_algo.hpp
@@ -137,6 +137,8 @@ class Interface
class AlgoSHA1 : public Interface
{
public:
+ static constexpr size_t integrityCheckValueLength = 12;
+
explicit AlgoSHA1(integrity::Algorithms intAlgo,
crypt::Algorithms cryptAlgo) :
Interface(intAlgo, cryptAlgo) {}
OpenPOWER on IntegriCloud