Skip to main content

open_encrypted

Function open_encrypted 

Source
pub fn open_encrypted(
    path: &Path,
    k_intermediate: &SecretBox<[u8; 32]>,
) -> DbResult<Connection>
Expand description

Opens a writable database, applies the encryption key, and configures the connection.

This is the standard open sequence for databases: open -> select cipher -> encrypt plaintext or unlock encrypted data -> verify -> configure policy.

See the module-level documentation for the full encryption flow.

ยงErrors

Returns Error if opening, keying, or configuring the connection fails.