Replaced system SQLite with SQLCipher to support encrypted database

This commit is contained in:
Oleksii Zghurskyi
2025-06-07 18:11:17 +03:00
parent f4198d62a7
commit 177d74700f
534 changed files with 362771 additions and 21 deletions

View File

@@ -0,0 +1,42 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#include "tomcrypt_private.h"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wconversion"
#pragma clang diagnostic ignored "-Wshorten-64-to-32"
/**
@file ecc_sizes.c
ECC Crypto, Tom St Denis
*/
#ifdef LTC_MECC
void ecc_sizes(int *low, int *high)
{
int i, size;
void *prime;
LTC_ARGCHKVD(low != NULL);
LTC_ARGCHKVD(high != NULL);
*low = INT_MAX;
*high = 0;
if (ltc_mp_init(&prime) == CRYPT_OK) {
for (i = 0; ltc_ecc_curves[i].prime != NULL; i++) {
if (ltc_mp_read_radix(prime, ltc_ecc_curves[i].prime, 16) == CRYPT_OK) {
size = ltc_mp_unsigned_bin_size(prime);
if (size < *low) *low = size;
if (size > *high) *high = size;
}
}
ltc_mp_clear(prime);
}
}
#endif
#pragma clang diagnostic pop