passphrase

A passphrase that SQLCipher stretches with PBKDF2 on every connection open. Slower than raw (Room opens up to five connections); prefer raw when the app owns the key.

The passphrase is encoded as UTF-8. A passphrase in SQLCipher's raw-key form (x' + 64, 96 or 160 hex digits + ') is refused: SQLCipher would use it as the key itself and skip PBKDF2. Use raw for raw keys.

Throws

if passphrase is empty (an empty key would leave the database unencrypted), has SQLCipher's raw-key form, or is not well-formed UTF-16 (an unpaired surrogate has no UTF-8 form, and other SQLCipher implementations would encode it differently).