2022-01-27 06:18:16 -05:00
|
|
|
#pragma once
|
|
|
|
//
|
|
|
|
// FILE: Adler.h
|
|
|
|
// AUTHOR: Rob Tillaart
|
2022-10-27 04:21:11 -04:00
|
|
|
// VERSION: 0.2.2
|
2022-01-27 06:18:16 -05:00
|
|
|
// DATE: 2022-01-27
|
2022-06-16 03:46:28 -04:00
|
|
|
// PURPOSE: Arduino Library for calculating Adler checksum
|
2022-01-27 06:18:16 -05:00
|
|
|
// URL: https://github.com/RobTillaart/Adler
|
|
|
|
// https://en.wikipedia.org/wiki/Adler-32
|
|
|
|
|
|
|
|
|
|
|
|
#include "Arduino.h"
|
|
|
|
|
|
|
|
|
2022-10-27 04:21:11 -04:00
|
|
|
#define ADLER_LIB_VERSION (F("0.2.2"))
|
2022-06-14 09:28:07 -04:00
|
|
|
|
|
|
|
|
2022-06-16 03:46:28 -04:00
|
|
|
const uint32_t ADLER32_MOD_PRIME = 65521;
|
|
|
|
const uint16_t ADLER16_MOD_PRIME = 251;
|
2022-01-27 06:18:16 -05:00
|
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////
|
|
|
|
//
|
2022-06-14 09:28:07 -04:00
|
|
|
// STATIC FUNCTIONS
|
2022-01-27 06:18:16 -05:00
|
|
|
//
|
2022-04-15 08:35:07 -04:00
|
|
|
uint32_t adler32(uint8_t *data, uint16_t length);
|
2022-06-16 03:46:28 -04:00
|
|
|
uint16_t adler16(uint8_t *data, uint16_t length);
|
2022-01-27 06:18:16 -05:00
|
|
|
|
|
|
|
|
|
|
|
// -- END OF FILE --
|
|
|
|
|
|
|
|
|