]> git.proxmox.com Git - mirror_qemu.git/blob - crypto/hmac-nettle.c
crypto: add HMAC algorithms framework
[mirror_qemu.git] / crypto / hmac-nettle.c
1 /*
2 * QEMU Crypto hmac algorithms (based on nettle)
3 *
4 * Copyright (c) 2016 HUAWEI TECHNOLOGIES CO., LTD.
5 *
6 * Authors:
7 * Longpeng(Mike) <longpeng2@huawei.com>
8 *
9 * This work is licensed under the terms of the GNU GPL, version 2 or
10 * (at your option) any later version. See the COPYING file in the
11 * top-level directory.
12 *
13 */
14
15 #include "qemu/osdep.h"
16 #include "qapi/error.h"
17 #include "crypto/hmac.h"
18 #include <nettle/hmac.h>
19
20 bool qcrypto_hmac_supports(QCryptoHashAlgorithm alg)
21 {
22 return false;
23 }
24
25 QCryptoHmac *qcrypto_hmac_new(QCryptoHashAlgorithm alg,
26 const uint8_t *key, size_t nkey,
27 Error **errp)
28 {
29 return NULL;
30 }
31
32 void qcrypto_hmac_free(QCryptoHmac *hmac)
33 {
34 return;
35 }
36
37 int qcrypto_hmac_bytesv(QCryptoHmac *hmac,
38 const struct iovec *iov,
39 size_t niov,
40 uint8_t **result,
41 size_t *resultlen,
42 Error **errp)
43 {
44 return -1;
45 }