summaryrefslogtreecommitdiff
path: root/src/http_auth_digest.c
blob: e440430da3f7f8061c8c1a3e91e1ff347c45b8a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <string.h>
#include "http_auth_digest.h"

#include "buffer.h"

#ifndef USE_OPENSSL
# include "md5.h"
#endif

void CvtHex(IN HASH Bin, OUT HASHHEX Hex) {
	unsigned short i;

	for (i = 0; i < HASHLEN; i++) {
		Hex[i*2] = int2hex((Bin[i] >> 4) & 0xf);
		Hex[i*2+1] = int2hex(Bin[i] & 0xf);
	}
	Hex[HASHHEXLEN] = '\0';
}