#include "xf_security/adler32.hpp"
template <int W> void adler32 ( hls::stream <ap_uint <32>>& adlerStrm, hls::stream <ap_uint <W*8>>& inStrm, hls::stream <ap_uint <5>>& inPackLenStrm, hls::stream <bool>& endInPackLenStrm, hls::stream <ap_uint <32>>& outStrm, hls::stream <bool>& endOutStrm )
adler32 computes the Adler-32 checksum of an input data.
Parameters:
W | byte number of input data, the value of W includes 1, 2, 4, 8, 16. |
adlerStrm | initialize adler32 value |
inStrm | messages to be checked |
inPackLenStrm | effective length of each pack from inStrm, 1~W. 0 means end of message |
endInPackLenStrm | end flag of inPackLenStrm, 1 “false” for 1 message, 1 “true” means no message anymore. |
outStrm | checksum result |
end | flag of outStrm |