Skip to main content

decrypt

Function decrypt 

Source
pub fn decrypt(
    ciphertext: &[u8],
    key: &SqlCipherKey,
) -> Result<Decrypted, DecryptError>
Expand description

Decrypt a SQLCipher database into a plaintext SQLite byte stream, detecting the cipher version by page-1 HMAC verification.

Returns DecryptError::KeyOrParametersMismatch if the key is wrong or the database uses cipher parameters outside the shipped v4/v3 defaults — a loud failure, never a silent wrong plaintext.