quakequest/Projects/Android/jni/darkplaces/hmac.h

16 lines
445 B
C
Raw Normal View History

2019-05-30 05:57:57 +00:00
#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