Skip to content

Commit

Permalink
Fix incompatible use of HMAC algorithm symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
utelle committed Sep 1, 2024
1 parent 06630fd commit 06838d2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/cipher_sqlcipher.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 06838d2

Please sign in to comment.