apsw-sqlite3mc 3.51.3.0__tar.gz → 3.51.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/PKG-INFO +2 -2
  2. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/README.rst +1 -1
  3. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw_sqlite3mc.egg-info/PKG-INFO +2 -2
  4. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/sqlite3/sqlite3.c +122 -25
  5. apsw_sqlite3mc-3.51.3.1/src/apswversion.h +1 -0
  6. apsw_sqlite3mc-3.51.3.0/src/apswversion.h +0 -1
  7. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/LICENSE +0 -0
  8. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/MANIFEST.in +0 -0
  9. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw/__init__.pyi +0 -0
  10. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw/__main__.py +0 -0
  11. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw/aio.py +0 -0
  12. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw/bestpractice.py +0 -0
  13. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw/ext.py +0 -0
  14. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw/fts5.py +0 -0
  15. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw/fts5aux.py +0 -0
  16. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw/fts5query.py +0 -0
  17. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw/fts_test_strings +0 -0
  18. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw/mcall.py +0 -0
  19. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw/py.typed +0 -0
  20. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw/shell.py +0 -0
  21. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw/speedtest.py +0 -0
  22. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw/sqlite_extra.json +0 -0
  23. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw/sqlite_extra.py +0 -0
  24. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw/sqlite_extra_binaries/README.md +0 -0
  25. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw/tests/__main__.py +0 -0
  26. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw/tests/aiotest.py +0 -0
  27. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw/tests/async_meta.py +0 -0
  28. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw/tests/carray.py +0 -0
  29. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw/tests/extratest.py +0 -0
  30. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw/tests/fork_checker.py +0 -0
  31. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw/tests/ftstests.py +0 -0
  32. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw/tests/jsonb.py +0 -0
  33. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw/tests/mctests.py +0 -0
  34. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw/tests/sessiontests.py +0 -0
  35. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw/trace.py +0 -0
  36. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw/unicode.py +0 -0
  37. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw_sqlite3mc.egg-info/SOURCES.txt +0 -0
  38. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw_sqlite3mc.egg-info/dependency_links.txt +0 -0
  39. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw_sqlite3mc.egg-info/entry_points.txt +0 -0
  40. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/apsw_sqlite3mc.egg-info/top_level.txt +0 -0
  41. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/checksums +0 -0
  42. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/pyproject.toml +0 -0
  43. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/setup.apsw +0 -0
  44. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/setup.cfg +0 -0
  45. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/setup.py +0 -0
  46. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/src/_unicodedb.c +0 -0
  47. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/src/apsw.c +0 -0
  48. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/src/apsw.docstrings +0 -0
  49. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/src/argparse.c +0 -0
  50. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/src/async.c +0 -0
  51. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/src/backup.c +0 -0
  52. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/src/blob.c +0 -0
  53. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/src/carray.c +0 -0
  54. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/src/connection.c +0 -0
  55. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/src/constants.c +0 -0
  56. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/src/cursor.c +0 -0
  57. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/src/exceptions.c +0 -0
  58. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/src/faultinject.c +0 -0
  59. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/src/faultinject.h +0 -0
  60. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/src/fileio_win32.c +0 -0
  61. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/src/fts.c +0 -0
  62. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/src/jsonb.c +0 -0
  63. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/src/pyutil.c +0 -0
  64. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/src/session.c +0 -0
  65. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/src/sqlite_debug.h +0 -0
  66. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/src/statementcache.c +0 -0
  67. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/src/stringconstants.c +0 -0
  68. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/src/testextension.c +0 -0
  69. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/src/traceback.c +0 -0
  70. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/src/unicode.c +0 -0
  71. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/src/util.c +0 -0
  72. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/src/vfs.c +0 -0
  73. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/src/vtable.c +0 -0
  74. {apsw_sqlite3mc-3.51.3.0 → apsw_sqlite3mc-3.51.3.1}/tools/vend.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: apsw_sqlite3mc
3
- Version: 3.51.3.0
3
+ Version: 3.51.3.1
4
4
  Summary: SQLite3 Multiple Ciphers combined with Another Python SQLite Wrapper
5
5
  Home-page: https://github.com/utelle/apsw-sqlite3mc
6
6
  Author: Ulrich Telle
@@ -89,7 +89,7 @@ Setting the key on a new database is the only change needed to your code.
89
89
 
90
90
  >>> import apsw
91
91
  >>> print(apsw.mc_version)
92
- SQLite3 Multiple Ciphers 2.3.1
92
+ SQLite3 Multiple Ciphers 2.3.2
93
93
  >>> con = apsw.Connection("database.sqlite3")
94
94
  >>> con.pragma("key", "my secret passphrase")
95
95
  ok
@@ -59,7 +59,7 @@ Setting the key on a new database is the only change needed to your code.
59
59
 
60
60
  >>> import apsw
61
61
  >>> print(apsw.mc_version)
62
- SQLite3 Multiple Ciphers 2.3.1
62
+ SQLite3 Multiple Ciphers 2.3.2
63
63
  >>> con = apsw.Connection("database.sqlite3")
64
64
  >>> con.pragma("key", "my secret passphrase")
65
65
  ok
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: apsw-sqlite3mc
3
- Version: 3.51.3.0
3
+ Version: 3.51.3.1
4
4
  Summary: SQLite3 Multiple Ciphers combined with Another Python SQLite Wrapper
5
5
  Home-page: https://github.com/utelle/apsw-sqlite3mc
6
6
  Author: Ulrich Telle
@@ -89,7 +89,7 @@ Setting the key on a new database is the only change needed to your code.
89
89
 
90
90
  >>> import apsw
91
91
  >>> print(apsw.mc_version)
92
- SQLite3 Multiple Ciphers 2.3.1
92
+ SQLite3 Multiple Ciphers 2.3.2
93
93
  >>> con = apsw.Connection("database.sqlite3")
94
94
  >>> con.pragma("key", "my secret passphrase")
95
95
  ok
@@ -266382,7 +266382,7 @@ SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
266382
266382
  ** Purpose: Header file for SQLite3 Multiple Ciphers support
266383
266383
  ** Author: Ulrich Telle
266384
266384
  ** Created: 2020-03-01
266385
- ** Copyright: (c) 2019-2024 Ulrich Telle
266385
+ ** Copyright: (c) 2019-2026 Ulrich Telle
266386
266386
  ** License: MIT
266387
266387
  */
266388
266388
 
@@ -266410,9 +266410,9 @@ SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
266410
266410
 
266411
266411
  #define SQLITE3MC_VERSION_MAJOR 2
266412
266412
  #define SQLITE3MC_VERSION_MINOR 3
266413
- #define SQLITE3MC_VERSION_RELEASE 1
266413
+ #define SQLITE3MC_VERSION_RELEASE 2
266414
266414
  #define SQLITE3MC_VERSION_SUBRELEASE 0
266415
- #define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 2.3.1"
266415
+ #define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 2.3.2"
266416
266416
 
266417
266417
  #endif /* SQLITE3MC_VERSION_H_ */
266418
266418
  /*** End of #include "sqlite3mc_version.h" ***/
@@ -280481,6 +280481,7 @@ SQLITE_API void sqlite3_activate_see(const char* zPassPhrase);
280481
280481
  SQLITE_API int sqlite3mc_cipher_count();
280482
280482
  SQLITE_API int sqlite3mc_cipher_index(const char* cipherName);
280483
280483
  SQLITE_API const char* sqlite3mc_cipher_name(int cipherIndex);
280484
+ SQLITE_API int sqlite3mc_cipher_name_copy(int cipherIndex, char* cipherName, int maxCipherNameSize);
280484
280485
  SQLITE_API int sqlite3mc_config(sqlite3* db, const char* paramName, int newValue);
280485
280486
  SQLITE_API int sqlite3mc_config_cipher(sqlite3* db, const char* cipherName, const char* paramName, int newValue);
280486
280487
  SQLITE_API unsigned char* sqlite3mc_codec_data(sqlite3* db, const char* zDbName, const char* paramName);
@@ -286414,7 +286415,7 @@ void RijndaelInvalidate(Rijndael* rijndael)
286414
286415
  /*
286415
286416
  ** Name: libaegis.c
286416
286417
  ** Purpose: Amalgamation of the AEGIS library
286417
- ** Copyright: (c) 2024-2025 Ulrich Telle
286418
+ ** Copyright: (c) 2024-2026 Ulrich Telle
286418
286419
  ** SPDX-License-Identifier: MIT
286419
286420
  */
286420
286421
 
@@ -286429,6 +286430,63 @@ void RijndaelInvalidate(Rijndael* rijndael)
286429
286430
  #define AEGIS_PRIVATE static
286430
286431
  #endif
286431
286432
 
286433
+ /* Namespacing to avoid conflicts with libsodium 1.0.21+ */
286434
+
286435
+ /* Base Implementation Structs */
286436
+ #define aegis128l_implementation sqlite3mc_aegis128l_implementation
286437
+ #define aegis128lx2_implementation sqlite3mc_aegis128lx2_implementation
286438
+ #define aegis128lx4_implementation sqlite3mc_aegis128lx4_implementation
286439
+ #define aegis256_implementation sqlite3mc_aegis256_implementation
286440
+ #define aegis256x2_implementation sqlite3mc_aegis256x2_implementation
286441
+ #define aegis256x4_implementation sqlite3mc_aegis256x4_implementation
286442
+
286443
+ /* Variants without hardware acceleration */
286444
+ #define aegis128l_soft_implementation sqlite3mc_aegis128l_soft_implementation
286445
+ #define aegis128x2_soft_implementation sqlite3mc_aegis128x2_soft_implementation
286446
+ #define aegis128x4_soft_implementation sqlite3mc_aegis128x4_soft_implementation
286447
+ #define aegis256_soft_implementation sqlite3mc_aegis256_soft_implementation
286448
+ #define aegis256x2_soft_implementation sqlite3mc_aegis256x2_soft_implementation
286449
+ #define aegis256x4_soft_implementation sqlite3mc_aegis256x4_soft_implementation
286450
+
286451
+ #define softaes_block_encrypt sqlite3mc_softaes_block_encrypt
286452
+
286453
+ /* Variants with support for AES and AVX instruction sets */
286454
+ #define aegis128l_aesni_implementation sqlite3mc_aegis128l_aesni_implementation
286455
+ #define aegis128x2_aesni_implementation sqlite3mc_aegis128x2_aesni_implementation
286456
+ #define aegis128x4_aesni_implementation sqlite3mc_aegis128x4_aesni_implementation
286457
+ #define aegis256_aesni_implementation sqlite3mc_aegis256_aesni_implementation
286458
+ #define aegis256x2_aesni_implementation sqlite3mc_aegis256x2_aesni_implementation
286459
+ #define aegis256x4_aesni_implementation sqlite3mc_aegis256x4_aesni_implementation
286460
+
286461
+ /* Variants with support for VAES and AVX2 instruction sets */
286462
+ #define aegis128x2_avx2_implementation sqlite3mc_aegis128x2_avx2_implementation
286463
+ #define aegis128x4_avx2_implementation sqlite3mc_aegis128x4_avx2_implementation
286464
+ #define aegis256x2_avx2_implementation sqlite3mc_aegis256x2_avx2_implementation
286465
+ #define aegis256x4_avx2_implementation sqlite3mc_aegis256x4_avx2_implementation
286466
+
286467
+ /* Variants with support for AVX512F instruction sets */
286468
+ #define aegis128x4_avx512_implementation sqlite3mc_aegis128x4_avx512_implementation
286469
+ #define aegis256x4_avx512_implementation sqlite3mc_aegis256x4_avx512_implementation
286470
+
286471
+ /* Variants with support for AltiVec instruction sets */
286472
+ #define aegis128l_altivec_implementation sqlite3mc_aegis128l_altivec_implementation
286473
+ #define aegis128x2_altivec_implementation sqlite3mc_aegis128x2_altivec_implementation
286474
+ #define aegis128x4_altivec_implementation sqlite3mc_aegis128x4_altivec_implementation
286475
+ #define aegis256_altivec_implementation sqlite3mc_aegis256_altivec_implementation
286476
+ #define aegis256x2_altivec_implementation sqlite3mc_aegis256x2_altivec_implementation
286477
+ #define aegis256x4_altivec_implementation sqlite3mc_aegis256x4_altivec_implementation
286478
+
286479
+ /* Variants with support for ARM Neon instruction sets */
286480
+ #define aegis128l_armcrypto_implementation sqlite3mc_aegis128l_armcrypto_implementation
286481
+ #define aegis128x2_armcrypto_implementation sqlite3mc_aegis128x2_armcrypto_implementation
286482
+ #define aegis128x4_armcrypto_implementation sqlite3mc_aegis128x4_armcrypto_implementation
286483
+ #define aegis256_armcrypto_implementation sqlite3mc_aegis256_armcrypto_implementation
286484
+ #define aegis256x2_armcrypto_implementation sqlite3mc_aegis256x2_armcrypto_implementation
286485
+ #define aegis256x4_armcrypto_implementation sqlite3mc_aegis256x4_armcrypto_implementation
286486
+
286487
+ /* Internal Tables (can conflict under -flto) */
286488
+ #define _aes_lut sqlite3mc_aegis_aes_lut
286489
+
286432
286490
  /* #include "common/cpu.h" */
286433
286491
  /*** Begin of #include "common/cpu.h" ***/
286434
286492
  /*
@@ -307713,12 +307771,10 @@ extern struct aegis128x4_implementation aegis128x4_avx512_implementation;
307713
307771
  #ifdef HAVE_VAESINTRIN_H
307714
307772
 
307715
307773
  #ifdef __clang__
307716
- # if __clang_major__ >= 18
307717
- # pragma clang attribute push(__attribute__((target("vaes,avx512f,evex512"))), \
307718
- apply_to = function)
307774
+ # if __clang_major__ >= 18 && __clang_major__ < 22
307775
+ # pragma clang attribute push(__attribute__((target("aes,vaes,avx512f,evex512"))), apply_to=function)
307719
307776
  # else
307720
- # pragma clang attribute push(__attribute__((target("vaes,avx512f"))), \
307721
- apply_to = function)
307777
+ # pragma clang attribute push(__attribute__((target("aes,vaes,avx512f"))), apply_to=function)
307722
307778
  # endif
307723
307779
  #elif defined(__GNUC__)
307724
307780
  # pragma GCC target("vaes,avx512f")
@@ -308860,12 +308916,10 @@ extern struct aegis256x4_implementation aegis256x4_avx512_implementation;
308860
308916
  #ifdef HAVE_VAESINTRIN_H
308861
308917
 
308862
308918
  #ifdef __clang__
308863
- # if __clang_major__ >= 18
308864
- # pragma clang attribute push(__attribute__((target("vaes,avx512f,evex512"))), \
308865
- apply_to = function)
308919
+ # if __clang_major__ >= 18 && __clang_major__ < 22
308920
+ # pragma clang attribute push(__attribute__((target("vaes,avx512f,evex512"))), apply_to=function)
308866
308921
  # else
308867
- # pragma clang attribute push(__attribute__((target("vaes,avx512f"))), \
308868
- apply_to = function)
308922
+ # pragma clang attribute push(__attribute__((target("vaes,avx512f"))), apply_to=function)
308869
308923
  # endif
308870
308924
  #elif defined(__GNUC__)
308871
308925
  # pragma GCC target("vaes,avx512f")
@@ -333304,7 +333358,7 @@ sqlite3mcConfigureSQLCipherVersion(sqlite3* db, int configDefault, int legacyVer
333304
333358
  ** Purpose: Configuration of SQLite codecs
333305
333359
  ** Author: Ulrich Telle
333306
333360
  ** Created: 2020-03-02
333307
- ** Copyright: (c) 2006-2024 Ulrich Telle
333361
+ ** Copyright: (c) 2006-2026 Ulrich Telle
333308
333362
  ** License: MIT
333309
333363
  */
333310
333364
 
@@ -333486,18 +333540,17 @@ sqlite3mc_cipher_index(const char* cipherName)
333486
333540
  return (j < count && globalCodecDescriptorTable[j].m_name[0] != 0) ? j + 1 : -1;
333487
333541
  }
333488
333542
 
333489
- SQLITE_API const char*
333490
- sqlite3mc_cipher_name(int cipherIndex)
333543
+ static const char*
333544
+ sqlite3mcFindCipherName(int cipherIndex)
333491
333545
  {
333492
- static char cipherName[CIPHER_NAME_MAXLEN] = "";
333546
+ const char* cipherName = NULL;
333493
333547
  int count;
333494
333548
  int j;
333495
333549
  #ifndef SQLITE_OMIT_AUTOINIT
333496
- if( sqlite3_initialize() ) return cipherName;
333550
+ if (sqlite3_initialize()) return NULL;
333497
333551
  #endif
333498
333552
  count = sqlite3mcGetGlobalCipherCount();
333499
333553
  j = 0;
333500
- cipherName[0] = '\0';
333501
333554
  if (cipherIndex > 0 && cipherIndex <= count)
333502
333555
  {
333503
333556
  for (j = 0; j < count && globalCodecDescriptorTable[j].m_name[0] != 0; ++j)
@@ -333506,13 +333559,57 @@ sqlite3mc_cipher_name(int cipherIndex)
333506
333559
  }
333507
333560
  if (j < count && globalCodecDescriptorTable[j].m_name[0] != 0)
333508
333561
  {
333509
- strncpy(cipherName, globalCodecDescriptorTable[j].m_name, CIPHER_NAME_MAXLEN - 1);
333510
- cipherName[CIPHER_NAME_MAXLEN - 1] = '\0';
333562
+ cipherName = globalCodecDescriptorTable[j].m_name;
333511
333563
  }
333512
333564
  }
333513
333565
  return cipherName;
333514
333566
  }
333515
333567
 
333568
+ SQLITE_API const char*
333569
+ sqlite3mc_cipher_name(int cipherIndex)
333570
+ {
333571
+ static char cipherName[CIPHER_NAME_MAXLEN] = "";
333572
+ const char* globalCipherName = sqlite3mcFindCipherName(cipherIndex);
333573
+ if (globalCipherName)
333574
+ {
333575
+ strncpy(cipherName, globalCipherName, CIPHER_NAME_MAXLEN - 1);
333576
+ cipherName[CIPHER_NAME_MAXLEN - 1] = '\0';
333577
+ }
333578
+ else
333579
+ {
333580
+ cipherName[0] = '\0';
333581
+ }
333582
+ return cipherName;
333583
+ }
333584
+
333585
+ SQLITE_API int
333586
+ sqlite3mc_cipher_name_copy(int cipherIndex, char* cipherName, int maxCipherNameSize)
333587
+ {
333588
+ int ok = 1;
333589
+ const char* globalCipherName = sqlite3mcFindCipherName(cipherIndex);
333590
+ if (globalCipherName)
333591
+ {
333592
+ int cipherNameLen = (int)strlen(globalCipherName) + 1;
333593
+ if (maxCipherNameSize >= cipherNameLen)
333594
+ {
333595
+ strncpy(cipherName, globalCipherName, maxCipherNameSize - 1);
333596
+ cipherName[maxCipherNameSize - 1] = '\0';
333597
+ }
333598
+ else
333599
+ {
333600
+ /* Buffer too small, return negative value of minimum required buffer length */
333601
+ ok = -cipherNameLen;
333602
+ }
333603
+ }
333604
+ else
333605
+ {
333606
+ /* Invalid index */
333607
+ cipherName[0] = '\0';
333608
+ ok = 0;
333609
+ }
333610
+ return ok;
333611
+ }
333612
+
333516
333613
  static
333517
333614
  int checkParameterValue(const char* paramName, int value, const char* cipherName)
333518
333615
  {
@@ -334056,16 +334153,16 @@ sqlite3mcConfigureFromUri(sqlite3* db, const char* zDbName, int configDefault)
334056
334153
  {
334057
334154
  /* Check whether cipher is specified */
334058
334155
  const char* cipherName = sqlite3_uri_parameter(dbFileName, "cipher");
334059
- if (cipherName == NULL)
334156
+ if (cipherName == NULL || cipherName[0] == 0)
334060
334157
  {
334061
334158
  int defaultCipherIndex = sqlite3mc_config(db, "cipher", -1);
334062
334159
  if (defaultCipherIndex > 0)
334063
334160
  {
334064
- cipherName = sqlite3mc_cipher_name(defaultCipherIndex);
334161
+ cipherName = sqlite3mcFindCipherName(defaultCipherIndex);
334065
334162
  sqlite3mc_config(db, "cipher", defaultCipherIndex);
334066
334163
  }
334067
334164
  }
334068
- if (cipherName != NULL)
334165
+ if (cipherName != NULL && cipherName[0] != 0)
334069
334166
  {
334070
334167
  int j = 0;
334071
334168
  CipherParams* cipherParams = NULL;
@@ -0,0 +1 @@
1
+ #define APSW_VERSION "3.51.3.1"
@@ -1 +0,0 @@
1
- #define APSW_VERSION "3.51.3.0"