summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/pwmdoc.cpp
Side-by-side diff
Diffstat (limited to 'pwmanager/pwmanager/pwmdoc.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/pwmdoc.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/pwmanager/pwmanager/pwmdoc.cpp b/pwmanager/pwmanager/pwmdoc.cpp
index 17cb74a..a740d6d 100644
--- a/pwmanager/pwmanager/pwmdoc.cpp
+++ b/pwmanager/pwmanager/pwmdoc.cpp
@@ -489,3 +489,3 @@ PwMerror PwMDoc::saveDoc(char compress, const QString *file)
}
- e = encrypt(&serialized, &currentPw, &f, cryptAlgo);
+ e = encrypt(&serialized, &currentPw, &f, cryptAlgo, hashAlgo);
if (e == e_weakPw) {
@@ -609,3 +609,3 @@ PwMerror PwMDoc::openDoc(const QString *file, int openLocked)
}
- ret = decrypt(&decrypted, headerLen, &currentPw, cryptAlgo, &f);
+ ret = decrypt(&decrypted, headerLen, &currentPw, cryptAlgo, dataHashType, &f);
if (ret == e_cryptNotImpl) {
@@ -1309,3 +1309,5 @@ bool PwMDoc::decompressDta(string *d, char algo)
-PwMerror PwMDoc::encrypt(string *d, const QString *pw, QFile *f, char algo)
+PwMerror PwMDoc::encrypt(string *d, const QString *pw, QFile *f, char algo,
+ char hashalgo //US BUG: pass _hashalgo because we need it in hashPassphrase
+)
{
@@ -1350,3 +1352,5 @@ PwMerror PwMDoc::encrypt(string *d, const QString *pw, QFile *f, char algo)
pw->length(),
- algo);
+ algo,
+ hashalgo //US BUG: pass _hashalgo because we need it in hashPassphrase
+ );
delete [] plain;
@@ -1373,3 +1377,5 @@ PwMerror PwMDoc::encrypt(string *d, const QString *pw, QFile *f, char algo)
PwMerror PwMDoc::decrypt(string *d, unsigned int pos, const QString *pw,
- char algo, QFile *f)
+ char algo,
+ char hashalgo, //US BUG: pass _hashalgo because we need it in hashPassphrase
+ QFile *f)
{
@@ -1425,3 +1431,5 @@ PwMerror PwMDoc::decrypt(string *d, unsigned int pos, const QString *pw,
pw->length(),
- algo);
+ algo,
+ hashalgo //US BUG: pass _hashalgo because we need it in hashPassphrase
+);
if (err != e_success) {