aboutsummaryrefslogtreecommitdiff
path: root/crypto/hmac-gnutls.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/hmac-gnutls.c')
-rw-r--r--crypto/hmac-gnutls.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/crypto/hmac-gnutls.c b/crypto/hmac-gnutls.c
index 24db383322..822995505c 100644
--- a/crypto/hmac-gnutls.c
+++ b/crypto/hmac-gnutls.c
@@ -20,14 +20,14 @@
#include "crypto/hmac.h"
#include "hmacpriv.h"
-static int qcrypto_hmac_alg_map[QCRYPTO_HASH_ALG__MAX] = {
- [QCRYPTO_HASH_ALG_MD5] = GNUTLS_MAC_MD5,
- [QCRYPTO_HASH_ALG_SHA1] = GNUTLS_MAC_SHA1,
- [QCRYPTO_HASH_ALG_SHA224] = GNUTLS_MAC_SHA224,
- [QCRYPTO_HASH_ALG_SHA256] = GNUTLS_MAC_SHA256,
- [QCRYPTO_HASH_ALG_SHA384] = GNUTLS_MAC_SHA384,
- [QCRYPTO_HASH_ALG_SHA512] = GNUTLS_MAC_SHA512,
- [QCRYPTO_HASH_ALG_RIPEMD160] = GNUTLS_MAC_RMD160,
+static int qcrypto_hmac_alg_map[QCRYPTO_HASH_ALGO__MAX] = {
+ [QCRYPTO_HASH_ALGO_MD5] = GNUTLS_MAC_MD5,
+ [QCRYPTO_HASH_ALGO_SHA1] = GNUTLS_MAC_SHA1,
+ [QCRYPTO_HASH_ALGO_SHA224] = GNUTLS_MAC_SHA224,
+ [QCRYPTO_HASH_ALGO_SHA256] = GNUTLS_MAC_SHA256,
+ [QCRYPTO_HASH_ALGO_SHA384] = GNUTLS_MAC_SHA384,
+ [QCRYPTO_HASH_ALGO_SHA512] = GNUTLS_MAC_SHA512,
+ [QCRYPTO_HASH_ALGO_RIPEMD160] = GNUTLS_MAC_RMD160,
};
typedef struct QCryptoHmacGnutls QCryptoHmacGnutls;
@@ -35,7 +35,7 @@ struct QCryptoHmacGnutls {
gnutls_hmac_hd_t handle;
};
-bool qcrypto_hmac_supports(QCryptoHashAlgorithm alg)
+bool qcrypto_hmac_supports(QCryptoHashAlgo alg)
{
size_t i;
const gnutls_digest_algorithm_t *algs;
@@ -52,7 +52,7 @@ bool qcrypto_hmac_supports(QCryptoHashAlgorithm alg)
return false;
}
-void *qcrypto_hmac_ctx_new(QCryptoHashAlgorithm alg,
+void *qcrypto_hmac_ctx_new(QCryptoHashAlgo alg,
const uint8_t *key, size_t nkey,
Error **errp)
{
@@ -61,7 +61,7 @@ void *qcrypto_hmac_ctx_new(QCryptoHashAlgorithm alg,
if (!qcrypto_hmac_supports(alg)) {
error_setg(errp, "Unsupported hmac algorithm %s",
- QCryptoHashAlgorithm_str(alg));
+ QCryptoHashAlgo_str(alg));
return NULL;
}