mirror of
https://github.com/logos-messaging/libchat.git
synced 2026-05-12 21:19:44 +00:00
chore: use encrypted db with default db pass
This commit is contained in:
parent
81b98be660
commit
3ada077429
@ -78,6 +78,7 @@ Data is stored in the `tmp/chat-cli-data/` directory:
|
|||||||
| `<username>_state.json` | CLI state: username↔chat mappings, message history, active chat |
|
| `<username>_state.json` | CLI state: username↔chat mappings, message history, active chat |
|
||||||
| `transport/<username>/` | Inbox directory for receiving messages |
|
| `transport/<username>/` | Inbox directory for receiving messages |
|
||||||
|
|
||||||
|
The sqlite tables can be viewed with app `DB Browser for SQLite`, password is `123456`, config use `SQLCipher 4 defaults`.
|
||||||
|
|
||||||
## Example Session
|
## Example Session
|
||||||
|
|
||||||
|
|||||||
@ -68,7 +68,10 @@ impl ChatApp {
|
|||||||
// Open or create the chat manager with file-based storage
|
// Open or create the chat manager with file-based storage
|
||||||
let manager = ChatManager::new_from_store(
|
let manager = ChatManager::new_from_store(
|
||||||
user_name,
|
user_name,
|
||||||
ChatStorage::new(StorageConfig::File(db_path.to_string_lossy().to_string()))?,
|
ChatStorage::new(StorageConfig::Encrypted {
|
||||||
|
path: db_path.to_string_lossy().to_string(),
|
||||||
|
key: "123456".to_string(),
|
||||||
|
})?,
|
||||||
)
|
)
|
||||||
.context("Failed to open ChatManager")?;
|
.context("Failed to open ChatManager")?;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user