mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-26 13:08:48 +03:00
parent
d55f7ea12b
commit
f4e670d8d5
1 changed files with 9 additions and 2 deletions
|
@ -1028,8 +1028,15 @@ ChatPage::decryptDownloadedSecrets(mtx::secret_storage::AesHmacSha2KeyDescriptio
|
||||||
|
|
||||||
auto decryptionKey = mtx::crypto::key_from_recoverykey(text.toStdString(), keyDesc);
|
auto decryptionKey = mtx::crypto::key_from_recoverykey(text.toStdString(), keyDesc);
|
||||||
|
|
||||||
if (!decryptionKey)
|
if (!decryptionKey && keyDesc.passphrase) {
|
||||||
decryptionKey = mtx::crypto::key_from_passphrase(text.toStdString(), keyDesc);
|
try {
|
||||||
|
decryptionKey =
|
||||||
|
mtx::crypto::key_from_passphrase(text.toStdString(), keyDesc);
|
||||||
|
} catch (std::exception &e) {
|
||||||
|
nhlog::crypto()->error("Failed to derive secret key from passphrase: {}",
|
||||||
|
e.what());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!decryptionKey) {
|
if (!decryptionKey) {
|
||||||
QMessageBox::information(
|
QMessageBox::information(
|
||||||
|
|
Loading…
Reference in a new issue