SQL Enclave is an encrypted data substrate for Swift apps based on SQLite and SQLCipher. It is a cross-platform Darwin (macOS, iOS, tvOS, watchOS) and Linux SPM module with no external dependencies.
SQLEnclave can be included in your project with:
SQLEnclave databases feature:
.enclave
files are opaque blobs)
SQL Enclave is mostly a re-packaging of multiple independent projects:
Browse the API Documentation.
What cryptography libraries does SQLEnclave use?
SQLCipher (and therefore also SQLEnclave) uses CommonCrypto on Darwin platforms and OpenSSL on Linux to implement cryptography features.
Is SQLEnclave compatible with SQLite?
SQLEnclave is compatible with standard SQLite databases. When a key is not provided, SQLEnclave will behave just like the standard SQLite library. It is also possible to convert from a plaintext database (standard SQLite) to an encrypted SQLCipher database using ATTACH and the sqlcipher_export() convenience function.
Note, however, that an encrypted database will not be readable by most sqlite3
executables found on other platforms.
How does SQLEnclave compare with the built-in SQLite framework on iOS?
The version of SQLite that ships with Darwin platforms does not have any encryption capabilities. Other than that, the two frameworks are identical.
SQLEnclave will run slower in Debug mode than the built-in SQLite module, but in Release mode the performance of unencrypted operations should be comparable. Encrypted operations will, naturally, be slower. Profiling has shown an average slowdown of encrypted operations by around 10–20%.
Can I trust the format of the SQLEnclave/SQLite database for long-term data storage?
SQLEnclave databases are simply encrypted SQLite databases, and SQLite is one of four formats (along with XML, JSON, and CSV) recommended for long-term storage of datasets by the United States Library of Congress.
link |
Stars: 0 |
Last commit: 1 year ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics