aboutsummaryrefslogtreecommitdiff
path: root/crypto/pbkdf.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2024-09-04 13:18:28 +0200
committerMarkus Armbruster <armbru@redhat.com>2024-09-10 14:02:16 +0200
commitef834aa2b2b52ac44ca97d70d5ef5e975a229034 (patch)
treed175decc323ac64104b4243d6c3389affe1d0804 /crypto/pbkdf.c
parent5f4059ef33e927ce9f72cb60000efa156566cd5c (diff)
downloadqemu-ef834aa2b2b52ac44ca97d70d5ef5e975a229034.zip
qemu-ef834aa2b2b52ac44ca97d70d5ef5e975a229034.tar.gz
qemu-ef834aa2b2b52ac44ca97d70d5ef5e975a229034.tar.bz2
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 7bbadc60b58b resolved]
Diffstat (limited to 'crypto/pbkdf.c')
-rw-r--r--crypto/pbkdf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/pbkdf.c b/crypto/pbkdf.c
index d1c06ef..0dd7c3a 100644
--- a/crypto/pbkdf.c
+++ b/crypto/pbkdf.c
@@ -87,7 +87,7 @@ static int qcrypto_pbkdf2_get_thread_cpu(unsigned long long *val_ms,
}
typedef struct CountItersData {
- QCryptoHashAlgorithm hash;
+ QCryptoHashAlgo hash;
const uint8_t *key;
size_t nkey;
const uint8_t *salt;
@@ -100,7 +100,7 @@ typedef struct CountItersData {
static void *threaded_qcrypto_pbkdf2_count_iters(void *data)
{
CountItersData *iters_data = (CountItersData *) data;
- QCryptoHashAlgorithm hash = iters_data->hash;
+ QCryptoHashAlgo hash = iters_data->hash;
const uint8_t *key = iters_data->key;
size_t nkey = iters_data->nkey;
const uint8_t *salt = iters_data->salt;
@@ -153,7 +153,7 @@ static void *threaded_qcrypto_pbkdf2_count_iters(void *data)
return NULL;
}
-uint64_t qcrypto_pbkdf2_count_iters(QCryptoHashAlgorithm hash,
+uint64_t qcrypto_pbkdf2_count_iters(QCryptoHashAlgo hash,
const uint8_t *key, size_t nkey,
const uint8_t *salt, size_t nsalt,
size_t nout,