xref: /openbmc/qemu/crypto/hashpriv.h (revision b14df228)
1 /*
2  * QEMU Crypto hash driver supports
3  *
4  * Copyright (c) 2017 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 #ifndef QCRYPTO_HASHPRIV_H
16 #define QCRYPTO_HASHPRIV_H
17 
18 typedef struct QCryptoHashDriver QCryptoHashDriver;
19 
20 struct QCryptoHashDriver {
21     int (*hash_bytesv)(QCryptoHashAlgorithm alg,
22                        const struct iovec *iov,
23                        size_t niov,
24                        uint8_t **result,
25                        size_t *resultlen,
26                        Error **errp);
27 };
28 
29 extern QCryptoHashDriver qcrypto_hash_lib_driver;
30 
31 #ifdef CONFIG_AF_ALG
32 
33 #include "afalgpriv.h"
34 
35 extern QCryptoHashDriver qcrypto_hash_afalg_driver;
36 
37 #endif
38 
39 #endif
40