Template Function pn532::checksum
Defined in File checksum.hpp
Function Documentation
-
template<class ByteIterator>
bool pn532::checksum(ByteIterator begin, ByteIterator end) Checks that the given sequence of bytes sums up to zero. When the checksum byte (computed e.g. with compute_checksum) is appended to a sequence, the whole sequence sums up to zero. This function thus expects the sequence to end with the checksum byte.
- Template Parameters:
ByteIterator – Any forward iterator type that yields
std::uint8_t
.- Parameters:
begin – Iterator pointing to the first element.
end – Past-the-end iterator.
- Returns:
True if and only if the sequence sums to zero.