# SQLCipher file size

**URL:** <https://discuss.zetetic.net/t/sqlcipher-file-size/2801>\
**Category:** SQLCipher\
**Created:** [April 27, 2018, 7:45pm UTC](https://discuss.zetetic.net/t/sqlcipher-file-size/2801 "2018-04-27T19:45:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dgrove](https://avatars.discourse-cdn.com/v4/letter/d/958977/32.png) [@dgrove](https://discuss.zetetic.net/u/dgrove)\
**Post date:** [April 27, 2018, 7:45pm UTC](https://discuss.zetetic.net/t/sqlcipher-file-size/2801/1 "2018-04-27T19:45:11Z")

</div>

I am writing code to detect suspected SQLCipher database files. One thing I noticed about the file size was that the five test database files I have (downloaded from GitHub) all have a greatest common factor of 8 bytes. Will this be true of all SQLCipher database files? If not, is there another size comparison of this nature that can help in determining a suspected SQLCipher database?

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [April 27, 2018, 9:33pm UTC](https://discuss.zetetic.net/t/sqlcipher-file-size/2801/2 "2018-04-27T21:33:51Z")

</div>

Hello @dgrove

You may not find that all SQLCipher database files align to the 8 bytes you are seeing. As the entire content of SQLCipher files are encrypted, there is not a specific heuristic that can be used to identify them.

If you are only filtering on either plain-text SQLite files, or SQLCipher files, you could attempt to disambiguate between the two by identifying the plain-text SQLite files by their [magic string](https://www.sqlite.org/fileformat.html#magic_header_string) located in the first 16 bytes of the database file header. The bytes, encoded to UTF-8 contain a value of `SQLite format 3`:

![26%20PM](https://us1.discourse-cdn.com/flex016/uploads/zetetic/original/1X/b720ca67db8f472451f4e202ba9270604cbeb4d5.png)
