# Multiplatform Encryption with SQLDelight and SQLCipher - Samuel Hill

DevFeed: [Multiplatform Encryption with SQLDelight and SQLCipher - Samuel Hill](<https://devfeed.tech/articles/multiplatform-encryption-with-sqldelight-and-sqlcipher-samuel-hill-38299.md>)

Original publisher: [Read original article](<https://touchlab.co/multiplatform-encryption-with-sqldelight-and-sqlcipher>)

Published: 2020-07-14T14:11:43Z

Content type: tutorial

Language: en

Sources: [Touchlab | Enterprise Mobile Innovation & Development](<https://devfeed.tech/sources/touchlab-enterprise-mobile-innovation-development.md>)

Topics: [Encryption](<https://devfeed.tech/topics/encryption.md>), [kotlin-native](<https://devfeed.tech/topics/kotlin-native.md>), [multiplatform](<https://devfeed.tech/topics/multiplatform.md>), [SQLite](<https://devfeed.tech/topics/sqlite.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [code-sharing](<https://devfeed.tech/tags/code-sharing.md>), [encryption](<https://devfeed.tech/tags/encryption.md>), [ios](<https://devfeed.tech/tags/ios.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [kotlin-native](<https://devfeed.tech/tags/kotlin-native.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [sqldelight](<https://devfeed.tech/tags/sqldelight.md>), [sqlite](<https://devfeed.tech/tags/sqlite.md>), [thoughts](<https://devfeed.tech/tags/thoughts.md>)

## AI overview

The article explains integrating SQLCipher encryption into a Kotlin/Native and Kotlin Multiplatform project using SQLDelight. It describes how SQLDelight's linkSqlite setting can cause vanilla SQLite3 to be linked, and warns that undocumented encryption behavior in iOS's SQLite build should not be mistaken for intentional SQLCipher usage.

## Source excerpt

Last year we received a PR to SQLiter (The Kotlin/Native driver that Touchlab maintains for SQLDelight) which laid the groundwork for handling encryption of our SQLite databases. Recently, Kevin Schildhorn and I have been working on taking the next step of introducing an encryption library in our Kotlin/Native build, specifically, SQLCipher. The first wrinkle we ran in to was that vanilla SQLite3 seemed to be getting linked automatically which made ensuring SQLCipher gets used tricky.