Open the account's database with the given passphrase. This can only be used on a closed account. If the account is new, this operation sets the database passphrase. For existing databases the passphrase should be the one used to encrypt the database the first time.
(self, passphrase: Optional[str] = None)
| 102 | hook.dc_account_init(account=self) |
| 103 | |
| 104 | def open(self, passphrase: Optional[str] = None) -> bool: |
| 105 | """Open the account's database with the given passphrase. |
| 106 | This can only be used on a closed account. If the account is new, this |
| 107 | operation sets the database passphrase. For existing databases the passphrase |
| 108 | should be the one used to encrypt the database the first time. |
| 109 | |
| 110 | :returns: True if the database is opened with this passphrase, False if the |
| 111 | passphrase is incorrect or an error occurred. |
| 112 | """ |
| 113 | return bool(lib.dc_context_open(self._dc_context, as_dc_charpointer(passphrase))) |
| 114 | |
| 115 | def disable_logging(self) -> None: |
| 116 | """disable logging.""" |