Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/store-sqlite-encrypted / EncryptDatabaseOptions

Interface: EncryptDatabaseOptions

Defined in: packages/store-sqlite-encrypted/src/encrypt.ts:36

Options for encryptDatabase.

Stable

Properties

PropertyModifierTypeDescriptionDefined in
cipher?readonlyEncryptionCipherCipher selection. Default 'sqlcipher' (SQLCipher v4 compatible).packages/store-sqlite-encrypted/src/encrypt.ts:44
overwriteTarget?readonlybooleanIf true, overwrite an existing targetPath instead of failing. Default false.packages/store-sqlite-encrypted/src/encrypt.ts:56
passphrasereadonlystring | Buffer<ArrayBufferLike>Passphrase for the new encrypted DB.packages/store-sqlite-encrypted/src/encrypt.ts:42
sourcePathreadonlystringPath to the existing unencrypted source DB.packages/store-sqlite-encrypted/src/encrypt.ts:38
swap?readonlybooleanIf true, atomically rename targetPath -> sourcePath after the integrity check passes. The original sourcePath is renamed to ${sourcePath}.bak.${timestamp} so an operator can recover. Default false — the CLI does the swap explicitly.packages/store-sqlite-encrypted/src/encrypt.ts:51
targetPathreadonlystringPath the encrypted output is written to. Must not exist.packages/store-sqlite-encrypted/src/encrypt.ts:40