add adler32 checksum algorithm

This commit is contained in:
Steffen Jaeckel
2015-08-22 17:29:46 +02:00
parent d6cea55b13
commit 1987a2f975
6 changed files with 158 additions and 0 deletions
+2
View File
@@ -430,6 +430,8 @@
#define LTC_HKDF
#endif /* LTC_NO_HKDF */
#define LTC_ADLER32
#endif /* LTC_NO_MISC */
/* cleanup */
+11
View File
@@ -69,6 +69,17 @@ void init_GMP(void);
#endif
*/
#ifdef LTC_ADLER32
typedef struct adler32_state_s
{
unsigned short s[2];
} adler32_state;
void adler32_init(adler32_state *ctx);
void adler32_update(adler32_state *ctx, const unsigned char *input, unsigned long length);
void adler32_finish(adler32_state *ctx, void *hash, unsigned long size);
int adler32_test(void);
#endif
/* $Source$ */
/* $Revision$ */