From 06838d2da772b2270cec1076c0bbe568dbc9a6be Mon Sep 17 00:00:00 2001 From: utelle Date: Sun, 1 Sep 2024 17:15:46 +0200 Subject: [PATCH] Fix incompatible use of HMAC algorithm symbols --- src/cipher_sqlcipher.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cipher_sqlcipher.c b/src/cipher_sqlcipher.c index 742bcc0..f626b6e 100644 --- a/src/cipher_sqlcipher.c +++ b/src/cipher_sqlcipher.c @@ -219,11 +219,11 @@ GetReservedSQLCipherCipher(void* cipher) { switch (sqlCipherCipher->m_hmacAlgorithm) { - case SQLCIPHER_HMAC_ALGORITHM_SHA1: - case SQLCIPHER_HMAC_ALGORITHM_SHA256: + case SQLCIPHER_ALGORITHM_SHA1: + case SQLCIPHER_ALGORITHM_SHA256: reserved += SHA256_DIGEST_SIZE; break; - case SQLCIPHER_HMAC_ALGORITHM_SHA512: + case SQLCIPHER_ALGORITHM_SHA512: default: reserved += SHA512_DIGEST_SIZE; break; @@ -337,13 +337,13 @@ GetHmacSizeSQLCipherCipher(int algorithm) int hmacSize = SHA512_DIGEST_SIZE; switch (algorithm) { - case SQLCIPHER_HMAC_ALGORITHM_SHA1: + case SQLCIPHER_ALGORITHM_SHA1: hmacSize = SHA1_DIGEST_SIZE; break; - case SQLCIPHER_HMAC_ALGORITHM_SHA256: + case SQLCIPHER_ALGORITHM_SHA256: hmacSize = SHA256_DIGEST_SIZE; break; - case SQLCIPHER_HMAC_ALGORITHM_SHA512: + case SQLCIPHER_ALGORITHM_SHA512: default: hmacSize = SHA512_DIGEST_SIZE; break;