1
2
3
4
5
6
7
8
9
10
11
12
13
14
15#ifndef QCRYPTO_HMACPRIV_H
16#define QCRYPTO_HMACPRIV_H
17
18typedef struct QCryptoHmacDriver QCryptoHmacDriver;
19
20struct QCryptoHmacDriver {
21 int (*hmac_bytesv)(QCryptoHmac *hmac,
22 const struct iovec *iov,
23 size_t niov,
24 uint8_t **result,
25 size_t *resultlen,
26 Error **errp);
27
28 void (*hmac_free)(QCryptoHmac *hmac);
29};
30
31void *qcrypto_hmac_ctx_new(QCryptoHashAlgo alg,
32 const uint8_t *key, size_t nkey,
33 Error **errp);
34extern QCryptoHmacDriver qcrypto_hmac_lib_driver;
35
36#ifdef CONFIG_AF_ALG
37
38#include "afalgpriv.h"
39
40QCryptoAFAlgo *qcrypto_afalg_hmac_ctx_new(QCryptoHashAlgo alg,
41 const uint8_t *key, size_t nkey,
42 Error **errp);
43extern QCryptoHmacDriver qcrypto_hmac_afalg_driver;
44
45#endif
46
47#endif
48