| * QEMU Crypto af_alg support |
| * Copyright (c) 2017 HUAWEI TECHNOLOGIES CO., LTD. |
| * Longpeng(Mike) <longpeng2@huawei.com> |
| * This work is licensed under the terms of the GNU GPL, version 2 or |
| * (at your option) any later version. See the COPYING file in the |
| #ifndef QCRYPTO_AFALGPRIV_H |
| #define QCRYPTO_AFALGPRIV_H |
| #include <linux/if_alg.h> |
| #define SALG_TYPE_LEN_MAX 14 |
| #define SALG_NAME_LEN_MAX 64 |
| #define AFALG_TYPE_CIPHER "skcipher" |
| #define AFALG_TYPE_HASH "hash" |
| #define ALG_MSGIV_LEN(len) (sizeof(struct af_alg_iv) + (len)) |
| typedef struct QCryptoAFAlg QCryptoAFAlg; |
| * qcrypto_afalg_comm_alloc: |
| * @type: the type of crypto operation |
| * @name: the name of crypto operation |
| * Allocate a QCryptoAFAlg object and bind itself to |
| * a new QCryptoAFAlg object, or NULL in error. |
| qcrypto_afalg_comm_alloc(const char *type, const char *name, |
| * @afalg: the QCryptoAFAlg object |
| void qcrypto_afalg_comm_free(QCryptoAFAlg *afalg); |