# Encrypt Plain DB within .Net Code

**URL:** https://discuss.zetetic.net/t/encrypt-plain-db-within-net-code/6092
**Category:** SQLCipher
**Created:** [September 15, 2023, 7:38pm UTC](https://discuss.zetetic.net/t/encrypt-plain-db-within-net-code/6092 "2023-09-15T19:38:40Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Francispell](https://avatars.discourse-cdn.com/v4/letter/f/49beb7/32.png) [@Francispell](https://discuss.zetetic.net/u/Francispell)
#### Post date: [September 15, 2023, 7:38pm UTC](https://discuss.zetetic.net/t/encrypt-plain-db-within-net-code/6092/1 "2023-09-15T19:38:41Z")

</div>

Is there a way to Encrypt a Plain Text Database within the .NET Code ?  
I only found examples with the sqlcipher exec and sqlcipher\_export function. Was wondering if this could be done as part of my software as I want to migrate dozens of databases and automate the process

---

<div class="post-metadata">

### Author: ![sjlombardo](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/sjlombardo/32/3_2.png) [@sjlombardo](https://discuss.zetetic.net/u/sjlombardo)
#### Post date: [September 15, 2023, 9:19pm UTC](https://discuss.zetetic.net/t/encrypt-plain-db-within-net-code/6092/2 "2023-09-15T21:19:07Z")

</div>

Hello @Francispell - yes, the examples are showing the command line, but you can use exactly the same `sqlcipher_export()` function from the .NET API. That function is built into SQLCipher and available from any of the programming language bindings that an application may use.
