File: md5.h

package info (click to toggle)
bird 1.6.8-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 4,516 kB
  • sloc: ansic: 43,639; sh: 3,364; perl: 2,022; lex: 678; makefile: 238; xml: 204; sed: 13
file content (36 lines) | stat: -rw-r--r-- 639 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
 *	BIRD Library -- MD5 Hash Function and HMAC-MD5 Function
 *
 *	(c) 2015 CZ.NIC z.s.p.o.
 *
 *	Adapted for BIRD by Martin Mares <mj@ucw.cz>
 *
 *	Can be freely distributed and used under the terms of the GNU GPL.
 */

#ifndef _BIRD_MD5_H_
#define _BIRD_MD5_H_

#include "nest/bird.h"


#define MD5_SIZE		16
#define MD5_HEX_SIZE		33
#define MD5_BLOCK_SIZE		64


struct hash_context;

struct md5_context {
  u32 buf[4];
  u32 bits[2];
  byte in[64];
};


void md5_init(struct hash_context *ctx);
void md5_update(struct hash_context *ctx, const byte *buf, uint len);
byte *md5_final(struct hash_context *ctx);


#endif /* _BIRD_MD5_H_ */