mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
qapi/crypto: Rename QCryptoHashAlgorithm to *Algo, and drop prefix
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]
This commit is contained in:
parent
5f4059ef33
commit
ef834aa2b2
54 changed files with 363 additions and 364 deletions
|
@ -68,15 +68,15 @@
|
|||
|
||||
static const struct {
|
||||
uint32_t mask;
|
||||
QCryptoHashAlgorithm algo;
|
||||
QCryptoHashAlgo algo;
|
||||
} hash_algo_map[] = {
|
||||
{ HASH_ALGO_MD5, QCRYPTO_HASH_ALG_MD5 },
|
||||
{ HASH_ALGO_SHA1, QCRYPTO_HASH_ALG_SHA1 },
|
||||
{ HASH_ALGO_SHA224, QCRYPTO_HASH_ALG_SHA224 },
|
||||
{ HASH_ALGO_SHA256, QCRYPTO_HASH_ALG_SHA256 },
|
||||
{ HASH_ALGO_SHA512_SERIES | HASH_ALGO_SHA512_SHA512, QCRYPTO_HASH_ALG_SHA512 },
|
||||
{ HASH_ALGO_SHA512_SERIES | HASH_ALGO_SHA512_SHA384, QCRYPTO_HASH_ALG_SHA384 },
|
||||
{ HASH_ALGO_SHA512_SERIES | HASH_ALGO_SHA512_SHA256, QCRYPTO_HASH_ALG_SHA256 },
|
||||
{ HASH_ALGO_MD5, QCRYPTO_HASH_ALGO_MD5 },
|
||||
{ HASH_ALGO_SHA1, QCRYPTO_HASH_ALGO_SHA1 },
|
||||
{ HASH_ALGO_SHA224, QCRYPTO_HASH_ALGO_SHA224 },
|
||||
{ HASH_ALGO_SHA256, QCRYPTO_HASH_ALGO_SHA256 },
|
||||
{ HASH_ALGO_SHA512_SERIES | HASH_ALGO_SHA512_SHA512, QCRYPTO_HASH_ALGO_SHA512 },
|
||||
{ HASH_ALGO_SHA512_SERIES | HASH_ALGO_SHA512_SHA384, QCRYPTO_HASH_ALGO_SHA384 },
|
||||
{ HASH_ALGO_SHA512_SERIES | HASH_ALGO_SHA512_SHA256, QCRYPTO_HASH_ALGO_SHA256 },
|
||||
};
|
||||
|
||||
static int hash_algo_lookup(uint32_t reg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue