| 782 | |
| 783 | |
| 784 | bool getUserCipher(WizDatabase& db, const WIZDOCUMENTDATA& encryptedDoc) |
| 785 | { |
| 786 | if (encryptedDoc.strGUID.isEmpty()) |
| 787 | { |
| 788 | WizMessageBox::warning(qApp->activeWindow(), QObject::tr("Info"), QObject::tr("Encrypted notes are not downloaded to local, " |
| 789 | "can not verify password!")); |
| 790 | return false; |
| 791 | } |
| 792 | |
| 793 | db.loadUserCert(); |
| 794 | if (!db.QueryCertPassword()) |
| 795 | return false; |
| 796 | |
| 797 | if (db.isDocumentDownloaded(encryptedDoc.strGUID)) |
| 798 | { |
| 799 | if (!db.isFileAccessible(encryptedDoc)) |
| 800 | { |
| 801 | WizMessageBox::warning(qApp->activeWindow(), QObject::tr("Info"), QObject::tr("Password error!")); |
| 802 | return false; |
| 803 | } |
| 804 | } |
| 805 | return true; |
| 806 | } |
| 807 | |
| 808 | bool WizAskUserCipherToOperateEncryptedNotes(const QString& sourceFolder, WizDatabase& db) |
| 809 | { |
no test coverage detected