ef834aa2b2
QAPI's 'prefix' feature can make the connection between enumeration
type and its constants less than obvious. It's best used with
restraint.
QCryptoHashAlgorithm has a 'prefix' that overrides the generated
enumeration constants' prefix to QCRYPTO_HASH_ALG.
We could simply drop 'prefix', but then the prefix becomes
QCRYPTO_HASH_ALGORITHM, which is rather long.
We could additionally rename the type to QCryptoHashAlg, but I think
the abbreviation "alg" is less than clear.
Rename the type to QCryptoHashAlgo instead. The prefix becomes to
QCRYPTO_HASH_ALGO.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20240904111836.3273842-12-armbru@redhat.com>
[Conflicts with merge commit 7bbadc60b5
resolved]
40 lines
879 B
C
40 lines
879 B
C
/*
|
|
* QEMU Crypto hash driver supports
|
|
*
|
|
* Copyright (c) 2017 HUAWEI TECHNOLOGIES CO., LTD.
|
|
*
|
|
* Authors:
|
|
* 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
|
|
* top-level directory.
|
|
*
|
|
*/
|
|
|
|
#ifndef QCRYPTO_HASHPRIV_H
|
|
#define QCRYPTO_HASHPRIV_H
|
|
|
|
typedef struct QCryptoHashDriver QCryptoHashDriver;
|
|
|
|
struct QCryptoHashDriver {
|
|
int (*hash_bytesv)(QCryptoHashAlgo alg,
|
|
const struct iovec *iov,
|
|
size_t niov,
|
|
uint8_t **result,
|
|
size_t *resultlen,
|
|
Error **errp);
|
|
};
|
|
|
|
extern QCryptoHashDriver qcrypto_hash_lib_driver;
|
|
|
|
#ifdef CONFIG_AF_ALG
|
|
|
|
#include "afalgpriv.h"
|
|
|
|
extern QCryptoHashDriver qcrypto_hash_afalg_driver;
|
|
|
|
#endif
|
|
|
|
#endif
|