Documentation
¶
Index ¶
- Constants
- func Bootstrap(dylibPath string) error
- type DB
- func OpenPlain(dbPath string, writable bool) (*DB, error)
- func OpenWithEncKey(dbPath, encKeyHex, saltHex string) (*DB, error)
- func OpenWithEncKeyWritable(dbPath, encKeyHex, saltHex string) (*DB, error)
- func OpenWithKeyMap(dbPath string, keys map[string]string) (*DB, error)
- func OpenWithKeyMapWritable(dbPath string, keys map[string]string) (*DB, error)
- type Row
- type Stmt
Constants ¶
const ( SQLITE_OK = 0 SQLITE_ROW = 100 SQLITE_DONE = 101 SQLITE_OPEN_READONLY = 0x00000001 SQLITE_OPEN_READWRITE = 0x00000002 SQLITE_OPEN_CREATE = 0x00000004 SQLITE_BUSY = 5 SQLITE_LOCKED = 6 COL_INT = 1 COL_FLOAT = 2 COL_TEXT = 3 COL_BLOB = 4 COL_NULL = 5 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func OpenPlain ¶
OpenPlain opens an unencrypted SQLite database with the bundled WCDB SQLite symbols. The caller must Bootstrap first. writable=false opens readonly.
func OpenWithEncKey ¶
OpenWithEncKey opens a WCDB-encrypted SQLite file using the raw-key path: encKeyHex is the 64-hex post-PBKDF2 enc_key (as harvested by `wxkey scan`) and saltHex is the 32-hex SQLCipher salt taken from the file's first 16 bytes. Skips PBKDF2 entirely; opening cost drops to a couple of HMACs.
func OpenWithEncKeyWritable ¶
func OpenWithKeyMap ¶
OpenWithKeyMap opens dbPath after reading the SQLCipher salt from the file header (first 16 bytes) and looking up the matching enc_key in keys (salt-hex -> enc_key-hex). wechat-cli intentionally supports only this schema-2 raw-key path; missing salts must be fixed by refreshing wxkey's key map.