2 * QEMU Crypto hash driver supports
4 * Copyright (c) 2024 Seagate Technology LLC and/or its Affiliates
5 * Copyright (c) 2017 HUAWEI TECHNOLOGIES CO., LTD.
8 * Longpeng(Mike) <longpeng2@huawei.com>
10 * This work is licensed under the terms of the GNU GPL, version 2 or
11 * (at your option) any later version. See the COPYING file in the
12 * top-level directory.
16 #ifndef QCRYPTO_HASHPRIV_H
17 #define QCRYPTO_HASHPRIV_H
19 #include "crypto/hash.h"
21 typedef struct QCryptoHashDriver QCryptoHashDriver
;
23 struct QCryptoHashDriver
{
24 QCryptoHash
*(*hash_new
)(QCryptoHashAlgo alg
, Error
**errp
);
25 int (*hash_update
)(QCryptoHash
*hash
,
26 const struct iovec
*iov
,
29 int (*hash_finalize
)(QCryptoHash
*hash
,
33 void (*hash_free
)(QCryptoHash
*hash
);
36 extern QCryptoHashDriver qcrypto_hash_lib_driver
;
40 #include "afalgpriv.h"
42 extern QCryptoHashDriver qcrypto_hash_afalg_driver
;