Validate Integrity Algorithm in Open Session Request command

Change-Id: I54106099fbbe50156529644eaadd65dc1db7e141
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
diff --git a/integrity_algo.hpp b/integrity_algo.hpp
index ac06e06..7b895c5 100644
--- a/integrity_algo.hpp
+++ b/integrity_algo.hpp
@@ -102,6 +102,26 @@
          */
         Buffer virtual generateIntegrityData(const Buffer& input) const = 0;
 
+        /**
+         * @brief Check if the Integrity algorithm is supported
+         *
+         * @param[in] algo - integrity algorithm
+         *
+         * @return true if algorithm is supported else false
+         *
+         */
+        static bool isAlgorithmSupported(Algorithms algo)
+        {
+            if (algo == Algorithms::NONE || algo == Algorithms::HMAC_SHA1_96)
+            {
+               return true;
+            }
+            else
+            {
+                return false;
+            }
+        }
+
         /*
          * AuthCode field length varies based on the integrity algorithm, for
          * HMAC-SHA1-96 the authcode field is 12 bytes. For HMAC-SHA256-128 and