Skip to content

Cannot Create Legacy SQLCipher Encrypted DB #88

@petef19

Description

@petef19

Following along the info stated in the readme file to a create a legacy SQLCipher encrypted DB that can be opened in SQLIte Browser.

Running this code:

import Database from 'better-sqlite3-multiple-ciphers';

const db = new Database('test.db', {verbose: console.log});
db.pragma(`cipher='sqlcipher'`)
db.pragma(`legacy=4`)
db.pragma(`key='secret-key'`);
db.close();

creates a valid sqlite3 db but that db is NOT encrypted, SQLIte Browser does NOT ask a for a password or key, it directly opens the empty db. Navicat does the same thing.

What am I doing wrong?

Win 10 x64
Node 16.13.2
better-sqlite3-multiple-ciphers: 9.4.1

Also, is there a list of operating systems that are known to work or not work with this package?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentation 📃Improvements or additions to documentationsolved ✔This issue has been solved / answered

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions