summary refs log tree commit diff stats
path: root/tests/bench/benchmark-crypto-akcipher.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bench/benchmark-crypto-akcipher.c')
-rw-r--r--tests/bench/benchmark-crypto-akcipher.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/bench/benchmark-crypto-akcipher.c b/tests/bench/benchmark-crypto-akcipher.c
index bbc29c9b12..0029972385 100644
--- a/tests/bench/benchmark-crypto-akcipher.c
+++ b/tests/bench/benchmark-crypto-akcipher.c
@@ -21,7 +21,7 @@
 static QCryptoAkCipher *create_rsa_akcipher(const uint8_t *priv_key,
                                             size_t keylen,
                                             QCryptoRSAPaddingAlgorithm padding,
-                                            QCryptoHashAlgorithm hash)
+                                            QCryptoHashAlgo hash)
 {
     QCryptoAkCipherOptions opt;
 
@@ -40,7 +40,7 @@ static void test_rsa_speed(const uint8_t *priv_key, size_t keylen,
 #define SIGN_TIMES 10000
 #define VERIFY_TIMES 100000
 #define PADDING QCRYPTO_RSA_PADDING_ALG_PKCS1
-#define HASH QCRYPTO_HASH_ALG_SHA1
+#define HASH QCRYPTO_HASH_ALGO_SHA1
 
     g_autoptr(QCryptoAkCipher) rsa =
         create_rsa_akcipher(priv_key, keylen, PADDING, HASH);
@@ -54,7 +54,7 @@ static void test_rsa_speed(const uint8_t *priv_key, size_t keylen,
 
     g_test_message("benchmark rsa%zu (%s-%s) sign...", key_size,
                    QCryptoRSAPaddingAlgorithm_str(PADDING),
-                   QCryptoHashAlgorithm_str(HASH));
+                   QCryptoHashAlgo_str(HASH));
     g_test_timer_start();
     for (count = 0; count < SIGN_TIMES; ++count) {
         g_assert(qcrypto_akcipher_sign(rsa, dgst, SHA1_DGST_LEN,
@@ -65,13 +65,13 @@ static void test_rsa_speed(const uint8_t *priv_key, size_t keylen,
     g_test_message("rsa%zu (%s-%s) sign %zu times in %.2f seconds,"
                    " %.2f times/sec ",
                    key_size,  QCryptoRSAPaddingAlgorithm_str(PADDING),
-                   QCryptoHashAlgorithm_str(HASH),
+                   QCryptoHashAlgo_str(HASH),
                    count, g_test_timer_last(),
                    (double)count / g_test_timer_last());
 
     g_test_message("benchmark rsa%zu (%s-%s) verification...", key_size,
                    QCryptoRSAPaddingAlgorithm_str(PADDING),
-                   QCryptoHashAlgorithm_str(HASH));
+                   QCryptoHashAlgo_str(HASH));
     g_test_timer_start();
     for (count = 0; count < VERIFY_TIMES; ++count) {
         g_assert(qcrypto_akcipher_verify(rsa, signature, key_size / BYTE,
@@ -82,7 +82,7 @@ static void test_rsa_speed(const uint8_t *priv_key, size_t keylen,
     g_test_message("rsa%zu (%s-%s) verify %zu times in %.2f seconds,"
                    " %.2f times/sec ",
                    key_size, QCryptoRSAPaddingAlgorithm_str(PADDING),
-                   QCryptoHashAlgorithm_str(HASH),
+                   QCryptoHashAlgo_str(HASH),
                    count, g_test_timer_last(),
                    (double)count / g_test_timer_last());
 }