2 * QEMU Crypto cipher driver supports
4 * Copyright (c) 2017 HUAWEI TECHNOLOGIES CO., LTD.
7 * Longpeng(Mike) <longpeng2@huawei.com>
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.
15 #ifndef QCRYPTO_CIPHERPRIV_H
16 #define QCRYPTO_CIPHERPRIV_H
18 #include "qapi/qapi-types-crypto.h"
20 typedef struct QCryptoCipherDriver QCryptoCipherDriver
;
22 struct QCryptoCipherDriver
{
23 int (*cipher_encrypt
)(QCryptoCipher
*cipher
,
29 int (*cipher_decrypt
)(QCryptoCipher
*cipher
,
35 int (*cipher_setiv
)(QCryptoCipher
*cipher
,
36 const uint8_t *iv
, size_t niv
,
39 void (*cipher_free
)(QCryptoCipher
*cipher
);
44 #include "afalgpriv.h"
47 qcrypto_afalg_cipher_ctx_new(QCryptoCipherAlgorithm alg
,
48 QCryptoCipherMode mode
,
50 size_t nkey
, Error
**errp
);
52 extern struct QCryptoCipherDriver qcrypto_cipher_afalg_driver
;