Validate Confidentiality Algo in Open Session request

Change-Id: I208e09926a18e215212564eca3203094015724c9
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
diff --git a/crypt_algo.hpp b/crypt_algo.hpp
index 6e22cf0..d1e3940 100644
--- a/crypt_algo.hpp
+++ b/crypt_algo.hpp
@@ -80,6 +80,26 @@
          */
         virtual buffer encryptPayload(buffer& payload) const = 0;
 
+        /**
+         * @brief Check if the Confidentiality algorithm is supported
+         *
+         * @param[in] algo - confidentiality algorithm
+         *
+         * @return true if algorithm is supported else false
+         *
+         */
+        static bool isAlgorithmSupported(Algorithms algo)
+        {
+            if (algo == Algorithms::NONE || algo == Algorithms::AES_CBC_128)
+            {
+               return true;
+            }
+            else
+            {
+                return false;
+            }
+        }
+
     protected:
 
         /**