mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-17 21:26:13 -07:00
crypto: cipher: add afalg-backend cipher support
Adds afalg-backend cipher support: introduces some private APIs firstly, and then intergrates them into qcrypto_cipher_afalg_driver. Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
f0d92b56d8
commit
25c60df32b
5 changed files with 271 additions and 4 deletions
|
|
@ -15,6 +15,8 @@
|
|||
#ifndef QCRYPTO_CIPHERPRIV_H
|
||||
#define QCRYPTO_CIPHERPRIV_H
|
||||
|
||||
#include "qapi-types.h"
|
||||
|
||||
typedef struct QCryptoCipherDriver QCryptoCipherDriver;
|
||||
|
||||
struct QCryptoCipherDriver {
|
||||
|
|
@ -37,4 +39,18 @@ struct QCryptoCipherDriver {
|
|||
void (*cipher_free)(QCryptoCipher *cipher);
|
||||
};
|
||||
|
||||
#ifdef CONFIG_AF_ALG
|
||||
|
||||
#include "afalgpriv.h"
|
||||
|
||||
extern QCryptoAFAlg *
|
||||
qcrypto_afalg_cipher_ctx_new(QCryptoCipherAlgorithm alg,
|
||||
QCryptoCipherMode mode,
|
||||
const uint8_t *key,
|
||||
size_t nkey, Error **errp);
|
||||
|
||||
extern struct QCryptoCipherDriver qcrypto_cipher_afalg_driver;
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue