]> git.xonotic.org Git - xonotic/darkplaces.git/blob - hmac.h
Doxygen: more tweaks
[xonotic/darkplaces.git] / hmac.h
1 #ifndef HMAC_H
2 #define HMAC_H
3
4 #include "qtypes.h"
5
6 typedef void (*hashfunc_t) (unsigned char *out, const unsigned char *in, int n);
7 qbool hmac(
8         hashfunc_t hfunc, int hlen, int hblock,
9         unsigned char *out,
10         const unsigned char *in, int n,
11         const unsigned char *key, int k
12 );
13
14 #define HMAC_MDFOUR_16BYTES(out, in, n, key, k) hmac(mdfour, 16, 64, out, in, n, key, k)
15 #define HMAC_SHA256_32BYTES(out, in, n, key, k) hmac(sha256, 32, 64, out, in, n, key, k)
16
17 #endif