diff --git a/integrity_algo.hpp b/integrity_algo.hpp
index 3d56b82..6c8460f 100644
--- a/integrity_algo.hpp
+++ b/integrity_algo.hpp
@@ -1,8 +1,9 @@
 #pragma once
 
+#include "rmcp.hpp"
+
 #include <array>
 #include <vector>
-#include "rmcp.hpp"
 
 namespace cipher
 {
@@ -39,109 +40,107 @@
  */
 class Interface
 {
-    public:
-        /**
-         * @brief Constructor for Interface
-         *
-         * @param[in] - AuthCode length
-         */
-        explicit Interface(size_t authLength)
-            : authCodeLength(authLength) {}
+  public:
+    /**
+     * @brief Constructor for Interface
+     *
+     * @param[in] - AuthCode length
+     */
+    explicit Interface(size_t authLength) : authCodeLength(authLength)
+    {
+    }
 
-        Interface() = delete;
-        virtual ~Interface() = default;
-        Interface(const Interface&) = default;
-        Interface& operator=(const Interface&) = default;
-        Interface(Interface&&) = default;
-        Interface& operator=(Interface&&) = default;
+    Interface() = delete;
+    virtual ~Interface() = default;
+    Interface(const Interface&) = default;
+    Interface& operator=(const Interface&) = default;
+    Interface(Interface&&) = default;
+    Interface& operator=(Interface&&) = default;
 
-        /**
-         * @brief Verify the integrity data of the packet
-         *
-         * @param[in] packet - Incoming IPMI packet
-         * @param[in] packetLen - Packet length excluding authCode
-         * @param[in] integrityData - Iterator to the authCode in the packet
-         *
-         * @return true if authcode in the packet is equal to one generated
-         *         using integrity algorithm on the packet data, false otherwise
-         */
-        bool virtual verifyIntegrityData(
-                const std::vector<uint8_t>& packet,
-                const size_t packetLen,
-                std::vector<uint8_t>::const_iterator integrityData) const = 0;
+    /**
+     * @brief Verify the integrity data of the packet
+     *
+     * @param[in] packet - Incoming IPMI packet
+     * @param[in] packetLen - Packet length excluding authCode
+     * @param[in] integrityData - Iterator to the authCode in the packet
+     *
+     * @return true if authcode in the packet is equal to one generated
+     *         using integrity algorithm on the packet data, false otherwise
+     */
+    bool virtual verifyIntegrityData(
+        const std::vector<uint8_t>& packet, const size_t packetLen,
+        std::vector<uint8_t>::const_iterator integrityData) const = 0;
 
-        /**
-         * @brief Generate integrity data for the outgoing IPMI packet
-         *
-         * @param[in] input - Outgoing IPMI packet
-         *
-         * @return authcode for the outgoing IPMI packet
-         *
-         */
-        std::vector<uint8_t> virtual generateIntegrityData(
-                const std::vector<uint8_t>& input) const = 0;
+    /**
+     * @brief Generate integrity data for the outgoing IPMI packet
+     *
+     * @param[in] input - Outgoing IPMI packet
+     *
+     * @return authcode for the outgoing IPMI packet
+     *
+     */
+    std::vector<uint8_t> virtual generateIntegrityData(
+        const std::vector<uint8_t>& 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)
+    /**
+     * @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::HMAC_SHA1_96 ||
+            algo == Algorithms::HMAC_SHA256_128)
         {
-            if (algo == Algorithms::HMAC_SHA1_96 ||
-                algo == Algorithms::HMAC_SHA256_128)
-            {
-               return true;
-            }
-            else
-            {
-                return false;
-            }
+            return true;
         }
+        else
+        {
+            return false;
+        }
+    }
 
-        /**
-         * @brief Generate additional keying material based on SIK
-         *
-         * @note
-         * The IPMI 2.0 spec only states that the additional keying material is
-         * generated by running HMAC(constN) using SIK as the key. It does not
-         * state whether this is the integrity algorithm or the authentication
-         * algorithm. Other implementations of the RMCP+ algorithm (ipmitool
-         * and ipmiutil) are not consistent on this matter. But it does not
-         * really matter because based on any of the defined cipher suites, the
-         * integrity and authentication algorithms are both based on the same
-         * digest method (integrity::Algorithms::HMAC_SHA1_96 uses SHA1 and
-         * rakp_auth::Algorithms::RAKP_HMAC_SHA1 uses SHA1). None of the
-         * defined cipher suites mix and match digests for integrity and
-         * authentication. Generating Kn belongs in either the integrity or
-         * authentication classes, so in this implementation, integrity has
-         * been chosen.
-         *
-         * @param[in] sik - session integrity key
-         * @param[in] data - 20-byte Const_n
-         *
-         * @return on success returns the Kn based on this integrity class
-         *
-         */
-        std::vector<uint8_t> virtual generateKn(
-                const std::vector<uint8_t>& sik,
-                const rmcp::Const_n& data) const = 0;
+    /**
+     * @brief Generate additional keying material based on SIK
+     *
+     * @note
+     * The IPMI 2.0 spec only states that the additional keying material is
+     * generated by running HMAC(constN) using SIK as the key. It does not
+     * state whether this is the integrity algorithm or the authentication
+     * algorithm. Other implementations of the RMCP+ algorithm (ipmitool
+     * and ipmiutil) are not consistent on this matter. But it does not
+     * really matter because based on any of the defined cipher suites, the
+     * integrity and authentication algorithms are both based on the same
+     * digest method (integrity::Algorithms::HMAC_SHA1_96 uses SHA1 and
+     * rakp_auth::Algorithms::RAKP_HMAC_SHA1 uses SHA1). None of the
+     * defined cipher suites mix and match digests for integrity and
+     * authentication. Generating Kn belongs in either the integrity or
+     * authentication classes, so in this implementation, integrity has
+     * been chosen.
+     *
+     * @param[in] sik - session integrity key
+     * @param[in] data - 20-byte Const_n
+     *
+     * @return on success returns the Kn based on this integrity class
+     *
+     */
+    std::vector<uint8_t> virtual generateKn(
+        const std::vector<uint8_t>& sik, const rmcp::Const_n& data) const = 0;
 
-        /** @brief Authcode field
-         *
-         *  AuthCode field length varies based on the integrity algorithm, for
-         *  HMAC-SHA1-96 the authcode field is 12 bytes. For HMAC-SHA256-128 and
-         *  HMAC-MD5-128 the authcode field is 16 bytes.
-         */
-        size_t authCodeLength;
+    /** @brief Authcode field
+     *
+     *  AuthCode field length varies based on the integrity algorithm, for
+     *  HMAC-SHA1-96 the authcode field is 12 bytes. For HMAC-SHA256-128 and
+     *  HMAC-MD5-128 the authcode field is 16 bytes.
+     */
+    size_t authCodeLength;
 
-    protected:
-
-        /** @brief K1 key used to generated the integrity data. */
-        std::vector<uint8_t> k1;
+  protected:
+    /** @brief K1 key used to generated the integrity data. */
+    std::vector<uint8_t> k1;
 };
 
 /**
@@ -157,76 +156,73 @@
  */
 class AlgoSHA1 final : public Interface
 {
-    public:
-        static constexpr size_t SHA1_96_AUTHCODE_LENGTH = 12;
+  public:
+    static constexpr size_t SHA1_96_AUTHCODE_LENGTH = 12;
 
-        /**
-         * @brief Constructor for AlgoSHA1
-         *
-         * @param[in] - Session Integrity Key
-         */
-        explicit AlgoSHA1(const std::vector<uint8_t>& sik);
+    /**
+     * @brief Constructor for AlgoSHA1
+     *
+     * @param[in] - Session Integrity Key
+     */
+    explicit AlgoSHA1(const std::vector<uint8_t>& sik);
 
-        AlgoSHA1() = delete;
-        ~AlgoSHA1() = default;
-        AlgoSHA1(const AlgoSHA1&) = default;
-        AlgoSHA1& operator=(const AlgoSHA1&) = default;
-        AlgoSHA1(AlgoSHA1&&) = default;
-        AlgoSHA1& operator=(AlgoSHA1&&) = default;
+    AlgoSHA1() = delete;
+    ~AlgoSHA1() = default;
+    AlgoSHA1(const AlgoSHA1&) = default;
+    AlgoSHA1& operator=(const AlgoSHA1&) = default;
+    AlgoSHA1(AlgoSHA1&&) = default;
+    AlgoSHA1& operator=(AlgoSHA1&&) = default;
 
-        /**
-         * @brief Verify the integrity data of the packet
-         *
-         * @param[in] packet - Incoming IPMI packet
-         * @param[in] length - Length of the data in the packet to calculate
-         *                     the integrity data
-         * @param[in] integrityData - Iterator to the authCode in the packet
-         *
-         * @return true if authcode in the packet is equal to one generated
-         *         using integrity algorithm on the packet data, false otherwise
-         */
-        bool verifyIntegrityData(
-                const std::vector<uint8_t>& packet,
-                const size_t length,
-                std::vector<uint8_t>::const_iterator integrityData)
-            const override;
+    /**
+     * @brief Verify the integrity data of the packet
+     *
+     * @param[in] packet - Incoming IPMI packet
+     * @param[in] length - Length of the data in the packet to calculate
+     *                     the integrity data
+     * @param[in] integrityData - Iterator to the authCode in the packet
+     *
+     * @return true if authcode in the packet is equal to one generated
+     *         using integrity algorithm on the packet data, false otherwise
+     */
+    bool verifyIntegrityData(
+        const std::vector<uint8_t>& packet, const size_t length,
+        std::vector<uint8_t>::const_iterator integrityData) const override;
 
-        /**
-         * @brief Generate integrity data for the outgoing IPMI packet
-         *
-         * @param[in] input - Outgoing IPMI packet
-         *
-         * @return on success return the integrity data for the outgoing IPMI
-         *         packet
-         */
-        std::vector<uint8_t> generateIntegrityData(
-                const std::vector<uint8_t>& packet) const override;
+    /**
+     * @brief Generate integrity data for the outgoing IPMI packet
+     *
+     * @param[in] input - Outgoing IPMI packet
+     *
+     * @return on success return the integrity data for the outgoing IPMI
+     *         packet
+     */
+    std::vector<uint8_t> generateIntegrityData(
+        const std::vector<uint8_t>& packet) const override;
 
-        /**
-         * @brief Generate additional keying material based on SIK
-         *
-         * @param[in] sik - session integrity key
-         * @param[in] data - 20-byte Const_n
-         *
-         * @return on success returns the Kn based on HMAC-SHA1
-         *
-         */
-        std::vector<uint8_t> generateKn(
-                const std::vector<uint8_t>& sik,
-                const rmcp::Const_n& const_n) const;
+    /**
+     * @brief Generate additional keying material based on SIK
+     *
+     * @param[in] sik - session integrity key
+     * @param[in] data - 20-byte Const_n
+     *
+     * @return on success returns the Kn based on HMAC-SHA1
+     *
+     */
+    std::vector<uint8_t> generateKn(const std::vector<uint8_t>& sik,
+                                    const rmcp::Const_n& const_n) const;
 
-    private:
-        /**
-         * @brief Generate HMAC based on HMAC-SHA1-96 algorithm
-         *
-         * @param[in] input - pointer to the message
-         * @param[in] length - length of the message
-         *
-         * @return on success returns the message authentication code
-         *
-         */
-        std::vector<uint8_t> generateHMAC(const uint8_t* input,
-                const size_t len) const;
+  private:
+    /**
+     * @brief Generate HMAC based on HMAC-SHA1-96 algorithm
+     *
+     * @param[in] input - pointer to the message
+     * @param[in] length - length of the message
+     *
+     * @return on success returns the message authentication code
+     *
+     */
+    std::vector<uint8_t> generateHMAC(const uint8_t* input,
+                                      const size_t len) const;
 };
 
 /**
@@ -242,79 +238,75 @@
  */
 class AlgoSHA256 final : public Interface
 {
-    public:
-        static constexpr size_t SHA256_128_AUTHCODE_LENGTH = 16;
+  public:
+    static constexpr size_t SHA256_128_AUTHCODE_LENGTH = 16;
 
-        /**
-         * @brief Constructor for AlgoSHA256
-         *
-         * @param[in] - Session Integrity Key
-         */
-        explicit AlgoSHA256(const std::vector<uint8_t>& sik);
+    /**
+     * @brief Constructor for AlgoSHA256
+     *
+     * @param[in] - Session Integrity Key
+     */
+    explicit AlgoSHA256(const std::vector<uint8_t>& sik);
 
-        AlgoSHA256() = delete;
-        ~AlgoSHA256() = default;
-        AlgoSHA256(const AlgoSHA256&) = default;
-        AlgoSHA256& operator=(const AlgoSHA256&) = default;
-        AlgoSHA256(AlgoSHA256&&) = default;
-        AlgoSHA256& operator=(AlgoSHA256&&) = default;
+    AlgoSHA256() = delete;
+    ~AlgoSHA256() = default;
+    AlgoSHA256(const AlgoSHA256&) = default;
+    AlgoSHA256& operator=(const AlgoSHA256&) = default;
+    AlgoSHA256(AlgoSHA256&&) = default;
+    AlgoSHA256& operator=(AlgoSHA256&&) = default;
 
-        /**
-         * @brief Verify the integrity data of the packet
-         *
-         * @param[in] packet - Incoming IPMI packet
-         * @param[in] length - Length of the data in the packet to calculate
-         *                     the integrity data
-         * @param[in] integrityData - Iterator to the authCode in the packet
-         *
-         * @return true if authcode in the packet is equal to one generated
-         *         using integrity algorithm on the packet data, false otherwise
-         */
-        bool verifyIntegrityData(
-                const std::vector<uint8_t>& packet,
-                const size_t length,
-                std::vector<uint8_t>::const_iterator integrityData)
-            const override;
+    /**
+     * @brief Verify the integrity data of the packet
+     *
+     * @param[in] packet - Incoming IPMI packet
+     * @param[in] length - Length of the data in the packet to calculate
+     *                     the integrity data
+     * @param[in] integrityData - Iterator to the authCode in the packet
+     *
+     * @return true if authcode in the packet is equal to one generated
+     *         using integrity algorithm on the packet data, false otherwise
+     */
+    bool verifyIntegrityData(
+        const std::vector<uint8_t>& packet, const size_t length,
+        std::vector<uint8_t>::const_iterator integrityData) const override;
 
-        /**
-         * @brief Generate integrity data for the outgoing IPMI packet
-         *
-         * @param[in] packet - Outgoing IPMI packet
-         *
-         * @return on success return the integrity data for the outgoing IPMI
-         *         packet
-         */
-        std::vector<uint8_t> generateIntegrityData(
-                const std::vector<uint8_t>& packet) const override;
+    /**
+     * @brief Generate integrity data for the outgoing IPMI packet
+     *
+     * @param[in] packet - Outgoing IPMI packet
+     *
+     * @return on success return the integrity data for the outgoing IPMI
+     *         packet
+     */
+    std::vector<uint8_t> generateIntegrityData(
+        const std::vector<uint8_t>& packet) const override;
 
-        /**
-         * @brief Generate additional keying material based on SIK
-         *
-         * @param[in] sik - session integrity key
-         * @param[in] data - 20-byte Const_n
-         *
-         * @return on success returns the Kn based on HMAC-SHA256
-         *
-         */
-        std::vector<uint8_t> generateKn(
-                const std::vector<uint8_t>& sik,
-                const rmcp::Const_n& const_n) const;
+    /**
+     * @brief Generate additional keying material based on SIK
+     *
+     * @param[in] sik - session integrity key
+     * @param[in] data - 20-byte Const_n
+     *
+     * @return on success returns the Kn based on HMAC-SHA256
+     *
+     */
+    std::vector<uint8_t> generateKn(const std::vector<uint8_t>& sik,
+                                    const rmcp::Const_n& const_n) const;
 
-    private:
-        /**
-         * @brief Generate HMAC based on HMAC-SHA256-128 algorithm
-         *
-         * @param[in] input - pointer to the message
-         * @param[in] len - length of the message
-         *
-         * @return on success returns the message authentication code
-         *
-         */
-        std::vector<uint8_t> generateHMAC(const uint8_t* input,
-                const size_t len) const;
+  private:
+    /**
+     * @brief Generate HMAC based on HMAC-SHA256-128 algorithm
+     *
+     * @param[in] input - pointer to the message
+     * @param[in] len - length of the message
+     *
+     * @return on success returns the message authentication code
+     *
+     */
+    std::vector<uint8_t> generateHMAC(const uint8_t* input,
+                                      const size_t len) const;
 };
 
-}// namespace integrity
+} // namespace integrity
 
-}// namespace cipher
-
+} // namespace cipher
