mirror of
https://github.com/DrBeef/QuakeQuest.git
synced 2024-12-23 02:50:49 +00:00
16 lines
445 B
C
16 lines
445 B
C
|
#ifndef HMAC_H
|
||
|
#define HMAC_H
|
||
|
|
||
|
typedef void (*hashfunc_t) (unsigned char *out, const unsigned char *in, int n);
|
||
|
qboolean hmac(
|
||
|
hashfunc_t hfunc, int hlen, int hblock,
|
||
|
unsigned char *out,
|
||
|
const unsigned char *in, int n,
|
||
|
const unsigned char *key, int k
|
||
|
);
|
||
|
|
||
|
#define HMAC_MDFOUR_16BYTES(out, in, n, key, k) hmac(mdfour, 16, 64, out, in, n, key, k)
|
||
|
#define HMAC_SHA256_32BYTES(out, in, n, key, k) hmac(sha256, 32, 64, out, in, n, key, k)
|
||
|
|
||
|
#endif
|