8#include <botan/internal/adler32.h>
10#include <botan/internal/loadstor.h>
16void adler32_update(
const uint8_t input[],
size_t length, uint16_t& S1, uint16_t& S2) {
57 for(
size_t j = 0; j != length; ++j) {
71void Adler32::add_data(std::span<const uint8_t> input) {
72 const size_t PROCESS_AMOUNT = 5552;
74 while(input.size() >= PROCESS_AMOUNT) {
75 adler32_update(input.data(), PROCESS_AMOUNT, m_S1, m_S2);
76 input = input.last(input.size() - PROCESS_AMOUNT);
79 adler32_update(input.data(), input.size(), m_S1, m_S2);
85void Adler32::final_result(std::span<uint8_t> output) {
91 return std::make_unique<Adler32>(*
this);
std::unique_ptr< HashFunction > copy_state() const override
constexpr auto store_be(ParamTs &&... params)