#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 <7>>& inPackLenStrm, 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. inPackLen.range(4,0) = effective len of pack, inPackLen.range(6,5) = 0x1 means end of one message, inPackLen.range(6,5) = 0x2 means end of all message. messages. |
outStrm | checksum result |
end | flag of outStrm |