xref: /qemu/crypto/hashpriv.h (revision aa8efad903a7594dbd9f96b9804c028f28fc8f8e)
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 #endif
32