#ifndef HASH_SHA256_2019_01_15_H #define HASH_SHA256_2019_01_15_H #include #if(__cplusplus >= 201703L) namespace al::crypto::stream::hash { #else namespace al { namespace crypto { namespace stream { namespace hash { #endif class hash_sha256 : public al::crypto::stream::hash::hash_sha_224_256_base<256U> { private: using base_class_type = al::crypto::stream::hash::hash_sha_224_256_base<256U>; public: hash_sha256() = default; hash_sha256(const hash_sha256& other) : base_class_type(static_cast(other)) { } hash_sha256(hash_sha256&& other) noexcept : base_class_type(static_cast(other)) { } ~hash_sha256() override = default; auto operator=(const hash_sha256& other) -> hash_sha256& { if(this != &other) { static_cast(base_class_type::operator=(static_cast(other))); } return *this; } auto operator=(hash_sha256&& other) noexcept -> hash_sha256& { static_cast(base_class_type::operator=(static_cast(other))); return *this; } void initialize() override { base_class_type::initialize(); base_class_type::transform_context[0U] = UINT32_C(0x6A09E667); base_class_type::transform_context[1U] = UINT32_C(0xBB67AE85); base_class_type::transform_context[2U] = UINT32_C(0x3C6EF372); base_class_type::transform_context[3U] = UINT32_C(0xA54FF53A); base_class_type::transform_context[4U] = UINT32_C(0x510E527F); base_class_type::transform_context[5U] = UINT32_C(0x9B05688C); base_class_type::transform_context[6U] = UINT32_C(0x1F83D9AB); base_class_type::transform_context[7U] = UINT32_C(0x5BE0CD19); } }; #if(__cplusplus >= 201703L) } // namespace al::crypto::stream::hash #else } // namespace hash } // namespace stream } // namespace crypto } // namespace al #endif #endif // HASH_SHA256_2019_01_15_H