api: add dc_context_change_passphrase()

This commit is contained in:
link2xt
2023-09-01 20:48:47 +00:00
parent dbe9d7e34e
commit cd477936b5
4 changed files with 94 additions and 0 deletions

View File

@@ -332,6 +332,12 @@ impl Context {
}
}
/// Changes encrypted database passphrase.
pub async fn change_passphrase(&self, passphrase: String) -> Result<()> {
self.sql.change_passphrase(passphrase).await?;
Ok(())
}
/// Returns true if database is open.
pub async fn is_open(&self) -> bool {
self.sql.is_open().await