pub fn is_database_encrypted<P>(path: P) -> Result<bool, Error>Expand description
Checks if a database file appears to be encrypted.
SQLCipher-encrypted databases have a different file header than plain SQLite. Plain SQLite databases start with “SQLite format 3\0” (16 bytes). Encrypted databases will have random-looking bytes at the start.
§Arguments
path- Path to the database file
§Returns
Ok(true)if the file exists and appears encryptedOk(false)if the file exists and appears unencrypted (plain SQLite)Ok(false)if the file doesn’t exist (new database)Errif there’s an I/O error reading the file