0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-10-18 18:08:45 +00:00
bird/lib/md5.h
Pavel Tvrdík 1512c11ddc MD5: change naming style
MD5Init         -> md5_init
MD5Update       -> md5_update
MD5Transform    -> md5_transform
MD5Final        -> md5_final
MD5Context      -> md5_context
2015-05-13 09:32:00 +02:00

31 lines
715 B
C

/*
* BIRD -- MD5 Hash Function and HMAC-MD5 Function
*
* (c) 2015 CZ.NIC z.s.p.o.
*
* Adapted for BIRD by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
*
* Can be freely distributed and used under the terms of the GNU GPL.
*/
#ifndef _BIRD_MD5_H_
#define _BIRD_MD5_H_
#define MD5_SIZE 16
#define MD5_HEX_SIZE 33
#define MD5_BLOCK_SIZE 64
struct md5_context {
u32 buf[4];
u32 bits[2];
unsigned char in[64];
} md5_context;
void md5_init(struct md5_context *context);
void md5_update(struct md5_context *context, unsigned char const *buf, unsigned len);
void md5_final(unsigned char digest[16], struct md5_context *context);
void md5_transform(u32 buf[4], u32 const in[16]);
#endif /* _BIRD_MD5_H_ */