#ifndef HASH_RIPEMD160_2019_04_07_H #define HASH_RIPEMD160_2019_04_07_H #include #include #if(__cplusplus >= 201703L) namespace al::crypto::stream::hash { #else namespace al { namespace crypto { namespace stream { namespace hash { #endif class hash_ripemd160 : public al::crypto::stream::hash::hash_ripemd_160_320_base<160U> // NOLINT(cppcoreguidelines-special-member-functions,hicpp-special-member-functions) { private: using base_class_type = al::crypto::stream::hash::hash_ripemd_160_320_base<160U>; public: hash_ripemd160() = default; hash_ripemd160(const hash_ripemd160& other) = default; ~hash_ripemd160() override = default; private: auto transform() -> void override { aaa = base_class_type::transform_context[0U]; bbb = base_class_type::transform_context[1U]; ccc = base_class_type::transform_context[2U]; ddd = base_class_type::transform_context[3U]; eee = base_class_type::transform_context[4U]; // Do the transformation rounds. transform_round(); // Combine the results. const std::uint32_t tmp = base_class_type::transform_context[0U]; base_class_type::transform_context[0U] = (base_class_type::transform_context[1U] + base_class_type::cc) + base_class_type::ddd; base_class_type::transform_context[1U] = (base_class_type::transform_context[2U] + base_class_type::dd) + base_class_type::eee; base_class_type::transform_context[2U] = (base_class_type::transform_context[3U] + base_class_type::ee) + base_class_type::aaa; base_class_type::transform_context[3U] = (base_class_type::transform_context[4U] + base_class_type::aa) + base_class_type::bbb; base_class_type::transform_context[4U] = (tmp + base_class_type::bb) + base_class_type::ccc; base_class_type::message_buffer.fill(0U); base_class_type::message_index = 0U; } }; #if(__cplusplus >= 201703L) } // namespace al::crypto::stream::hash #else } // namespace hash } // namespace stream } // namespace crypto } // namespace al #endif #endif // HASH_RIPEMD160_2019_04_07_H