Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
harbour-MPW
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Andrea Scarpino
harbour-MPW
Commits
2ad84c48
Commit
2ad84c48
authored
Jul 20, 2016
by
Andrea Scarpino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show a visible fingerprint for the generated password
parent
ba12e68e
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
59 additions
and
32 deletions
+59
-32
qml/pages/Settings.qml
qml/pages/Settings.qml
+8
-1
rpm/harbour-mpw.changes
rpm/harbour-mpw.changes
+3
-0
rpm/harbour-mpw.spec
rpm/harbour-mpw.spec
+1
-1
rpm/harbour-mpw.yaml
rpm/harbour-mpw.yaml
+1
-1
src/asyncmasterkey.cpp
src/asyncmasterkey.cpp
+8
-1
src/asyncmasterkey.h
src/asyncmasterkey.h
+1
-1
src/mpwmanager.cpp
src/mpwmanager.cpp
+8
-2
src/mpwmanager.h
src/mpwmanager.h
+4
-2
translations/harbour-mpw-it.ts
translations/harbour-mpw-it.ts
+11
-9
translations/harbour-mpw-sv.ts
translations/harbour-mpw-sv.ts
+7
-7
translations/harbour-mpw.ts
translations/harbour-mpw.ts
+7
-7
No files found.
qml/pages/Settings.qml
View file @
2ad84c48
...
...
@@ -34,9 +34,9 @@ Page {
target
:
manager
onGeneratedMasterKey
:
{
fprint
.
text
=
fingerprint
;
busy
.
visible
=
busy
.
running
=
false
;
name
.
enabled
=
password
.
enabled
=
version
.
enabled
=
true
;
pageStack
.
pop
();
}
}
...
...
@@ -87,6 +87,11 @@ Page {
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
Label
{
id
:
fprint
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
Button
{
id
:
save
text
:
qsTr
(
"
Generate
"
);
...
...
@@ -96,6 +101,7 @@ Page {
onClicked
:
{
enabled
=
name
.
enabled
=
password
.
enabled
=
version
.
enabled
=
false
;
busy
.
visible
=
busy
.
running
=
true
;
fprint
.
text
=
""
;
manager
.
generateMasterKey
(
name
.
text
,
password
.
text
,
version
.
currentIndex
);
}
}
...
...
@@ -103,6 +109,7 @@ Page {
Component
.
onCompleted
:
{
name
.
text
=
manager
.
getName
();
fprint
.
text
=
manager
.
getFingerprint
();
if
(
name
.
text
.
length
>
0
)
{
password
.
forceActiveFocus
();
...
...
rpm/harbour-mpw.changes
View file @
2ad84c48
* Wed Jul 20 2016 Andrea Scarpino <me@andreascarpino.it> 0.2.1-1
- Show a visible fingerprint for the generated password
* Tue Jun 07 2016 Andrea Scarpino <me@andreascarpino.it> 0.2.0-1
- Store sites and their preferences
- Show password in cover page
...
...
rpm/harbour-mpw.spec
View file @
2ad84c48
...
...
@@ -13,7 +13,7 @@ Name: harbour-mpw
%{!?qtc_make:%define qtc_make make}
%{?qtc_builddir:%define _builddir %qtc_builddir}
Summary: MasterPassword client
Version: 0.2.
0
Version: 0.2.
1
Release: 1
Group: Qt/Qt
License: MIT
...
...
rpm/harbour-mpw.yaml
View file @
2ad84c48
Name
:
harbour-mpw
Summary
:
MasterPassword client
Version
:
0.2.
0
Version
:
0.2.
1
Release
:
1
# The contents of the Group field should be one of the groups listed here:
# http://gitorious.org/meego-developer-tools/spectacle/blobs/master/data/GROUPS
...
...
src/asyncmasterkey.cpp
View file @
2ad84c48
...
...
@@ -32,6 +32,11 @@ extern "C"
#define MPWALGORITHM_H
#include <mpw-algorithm.h>
#endif
#ifndef MPWUTIL_H
#define MPWUTIL_H
#include <mpw-util.h>
#endif
}
AsyncMasterKey
::
AsyncMasterKey
(
const
QString
&
name
,
const
QString
&
password
,
...
...
@@ -56,5 +61,7 @@ void AsyncMasterKey::generate()
qCritical
()
<<
"Error during master key generation."
;
}
Q_EMIT
finished
(
key
);
const
char
*
fingerprint
=
mpw_identicon
(
m_name
.
toUtf8
().
data
(),
m_password
.
toUtf8
().
data
());
Q_EMIT
finished
(
key
,
QString
::
fromUtf8
(
fingerprint
));
}
src/asyncmasterkey.h
View file @
2ad84c48
...
...
@@ -38,7 +38,7 @@ public:
virtual
~
AsyncMasterKey
();
Q_SIGNALS:
void
finished
(
QByteArray
*
key
);
void
finished
(
QByteArray
*
key
,
const
QString
&
fingerprint
);
public
Q_SLOTS
:
void
generate
();
...
...
src/mpwmanager.cpp
View file @
2ad84c48
...
...
@@ -62,6 +62,11 @@ QString MPWManager::getName() const
return
m_name
;
}
QString
MPWManager
::
getFingerprint
()
const
{
return
m_fingerprint
;
}
void
MPWManager
::
setAlgorithmVersion
(
AlgorithmVersion
version
)
{
qDebug
()
<<
"Using algorithm version:"
<<
version
;
...
...
@@ -92,12 +97,13 @@ void MPWManager::generateMasterKey(const QString &name, const QString &password,
thread
->
start
();
}
void
MPWManager
::
gotMasterKey
(
QByteArray
*
key
)
void
MPWManager
::
gotMasterKey
(
QByteArray
*
key
,
const
QString
&
fingerprint
)
{
qDebug
()
<<
"Storing master key"
;
m_key
=
key
;
Q_EMIT
generatedMasterKey
();
m_fingerprint
=
fingerprint
;
Q_EMIT
generatedMasterKey
(
fingerprint
);
}
QString
MPWManager
::
getPassword
(
const
QString
&
site
,
PasswordType
type
,
const
uint
counter
)
const
...
...
src/mpwmanager.h
View file @
2ad84c48
...
...
@@ -59,6 +59,7 @@ public:
Q_INVOKABLE
AlgorithmVersion
getAlgorithmVersion
()
const
;
Q_INVOKABLE
QString
getName
()
const
;
Q_INVOKABLE
QString
getFingerprint
()
const
;
Q_INVOKABLE
void
setAlgorithmVersion
(
AlgorithmVersion
version
);
Q_INVOKABLE
void
setName
(
const
QString
&
name
);
...
...
@@ -73,10 +74,10 @@ public:
static
MPSiteType
toMPSiteType
(
PasswordType
type
);
Q_SIGNALS:
void
generatedMasterKey
();
void
generatedMasterKey
(
const
QString
&
fingerprint
);
protected
Q_SLOTS
:
void
gotMasterKey
(
QByteArray
*
key
);
void
gotMasterKey
(
QByteArray
*
key
,
const
QString
&
fingerprint
);
private:
AlgorithmVersion
algVersionFromInt
(
const
uint
&
version
);
...
...
@@ -84,6 +85,7 @@ private:
DBManager
*
m_db
;
SitesSqlModel
*
m_model
;
QString
m_name
;
QString
m_fingerprint
;
AlgorithmVersion
m_algVersion
;
QByteArray
*
m_key
;
QSettings
*
m_settings
;
...
...
translations/harbour-mpw-it.ts
View file @
2ad84c48
<
?
xml
version
=
"
1.0
"
?
><!
DOCTYPE
TS
><
TS
language
=
"
it
"
version
=
"
2.1
"
>
<
?
xml
version
=
"
1.0
"
encoding
=
"
utf-8
"
?
>
<!
DOCTYPE
TS
>
<
TS
version
=
"
2.1
"
language
=
"
it
"
>
<
context
>
<
name
>
MainPage
<
/name
>
<
message
>
...
...
@@ -100,37 +102,37 @@
<
translation
>
Nome
completo
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
6
8
"
/>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
6
4
"
/>
<
source
>
Master
password
<
/source
>
<
translation
>
Master
password
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
80
"
/>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
72
"
/>
<
source
>
Algorithm
version
<
/source
>
<
translation
>
Versione
algoritmo
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
85
"
/>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
77
"
/>
<
source
>
V0
<
/source
>
<
translation
>
V0
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
86
"
/>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
78
"
/>
<
source
>
V1
<
/source
>
<
translation
>
V1
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
87
"
/>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
79
"
/>
<
source
>
V2
<
/source
>
<
translation
>
V2
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
8
8
"
/>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
8
0
"
/>
<
source
>
V3
<
/source
>
<
translation
>
V3
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
100
"
/>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
97
"
/>
<
source
>
Generate
<
/source
>
<
translation
>
Genera
<
/translation
>
<
/message
>
...
...
@@ -148,4 +150,4 @@
<
translation
>
Sto
cancellando
...
<
/translation
>
<
/message
>
<
/context
>
<
/TS>
\ No newline at end of file
<
/TS
>
translations/harbour-mpw-sv.ts
View file @
2ad84c48
...
...
@@ -102,37 +102,37 @@
<
translation
>
Fullst
ä
ndigt
namn
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
6
8
"
/>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
6
4
"
/>
<
source
>
Master
password
<
/source
>
<
translation
>
Huvudl
ö
senord
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
80
"
/>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
72
"
/>
<
source
>
Algorithm
version
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
85
"
/>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
77
"
/>
<
source
>
V0
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
86
"
/>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
78
"
/>
<
source
>
V1
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
87
"
/>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
79
"
/>
<
source
>
V2
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
8
8
"
/>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
8
0
"
/>
<
source
>
V3
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
100
"
/>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
97
"
/>
<
source
>
Generate
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
...
...
translations/harbour-mpw.ts
View file @
2ad84c48
...
...
@@ -102,37 +102,37 @@
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
6
8
"
/>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
6
4
"
/>
<
source
>
Master
password
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
80
"
/>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
72
"
/>
<
source
>
Algorithm
version
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
85
"
/>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
77
"
/>
<
source
>
V0
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
86
"
/>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
78
"
/>
<
source
>
V1
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
87
"
/>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
79
"
/>
<
source
>
V2
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
8
8
"
/>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
8
0
"
/>
<
source
>
V3
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
100
"
/>
<
location
filename
=
"
../qml/pages/Settings.qml
"
line
=
"
97
"
/>
<
source
>
Generate
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment