Merge branch 'dev'
61
.gdb_history
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
b ContactDataStore::dump()
|
||||||
|
r
|
||||||
|
n
|
||||||
|
q
|
||||||
|
b ContactDataStore::dump()
|
||||||
|
r
|
||||||
|
n
|
||||||
|
c
|
||||||
|
./build.sh
|
||||||
|
$(./build.sh)
|
||||||
|
$(./build.sh)
|
||||||
|
q
|
||||||
|
r
|
||||||
|
q
|
||||||
|
r
|
||||||
|
b ContactDataStore::dump()
|
||||||
|
r
|
||||||
|
n
|
||||||
|
b ContactItem::toJson()
|
||||||
|
r
|
||||||
|
c
|
||||||
|
n
|
||||||
|
q
|
||||||
|
b ContactItem::toJson()
|
||||||
|
r
|
||||||
|
n
|
||||||
|
c
|
||||||
|
c
|
||||||
|
c
|
||||||
|
c
|
||||||
|
c
|
||||||
|
c
|
||||||
|
c
|
||||||
|
c
|
||||||
|
q
|
||||||
|
b FileSystem::writeContacts(QString file, json j)
|
||||||
|
b FileSystem::writeContacts
|
||||||
|
r
|
||||||
|
q
|
||||||
|
b FileSystem::writeContacts
|
||||||
|
r
|
||||||
|
b ContactDataStore::dump()
|
||||||
|
r
|
||||||
|
c
|
||||||
|
n
|
||||||
|
q
|
||||||
|
b FileSystem::writeContacts
|
||||||
|
r
|
||||||
|
n
|
||||||
|
q
|
||||||
|
r
|
||||||
|
b FileEncryption::encrypt
|
||||||
|
r
|
||||||
|
s
|
||||||
|
n
|
||||||
|
q
|
||||||
|
b FileSystem::readContactsOldFormat
|
||||||
|
r
|
||||||
|
n
|
||||||
|
c
|
||||||
|
q
|
||||||
1
.gitignore
vendored
@@ -40,3 +40,4 @@ silentdragonlite.pro.user.4.10-pre1
|
|||||||
silentdragonlite
|
silentdragonlite
|
||||||
silentdragonlite_plugin_import.cpp
|
silentdragonlite_plugin_import.cpp
|
||||||
silentdragonlite_resource.rc
|
silentdragonlite_resource.rc
|
||||||
|
SilentDragonLite
|
||||||
@@ -7,25 +7,73 @@
|
|||||||
<file>res/loading.gif</file>
|
<file>res/loading.gif</file>
|
||||||
<file>res/paymentreq.gif</file>
|
<file>res/paymentreq.gif</file>
|
||||||
<file>res/icon.ico</file>
|
<file>res/icon.ico</file>
|
||||||
|
<file>res/mail.png</file>
|
||||||
|
<file>res/darkwing.png</file>
|
||||||
|
<file>res/SDLogo.png</file>
|
||||||
|
<file>res/sdlogo2.png</file>
|
||||||
|
<file>res/Berg.png</file>
|
||||||
|
<file>res/Denio.png</file>
|
||||||
|
<file>res/Duke.png</file>
|
||||||
|
<file>res/Sharpee.png</file>
|
||||||
|
<file>res/Yoda.png</file>
|
||||||
|
<file>res/Mickey.png</file>
|
||||||
|
<file>res/Snoopy.png</file>
|
||||||
|
<file>res/Popey.png</file>
|
||||||
|
<file>res/Garfield.png</file>
|
||||||
|
<file>res/Pinguin.png</file>
|
||||||
|
<file>res/Stag.png</file>
|
||||||
|
<file>res/Elsa.png</file>
|
||||||
|
<file>res/send.png</file>
|
||||||
|
<file>res/send.svg</file>
|
||||||
|
<file>res/addcontact.svg</file>
|
||||||
|
<file>res/send-new.svg</file>
|
||||||
|
<file>res/add_contact.svg</file>
|
||||||
|
<file>res/notification.svg</file>
|
||||||
|
<file>res/send-new-white.png</file>
|
||||||
|
<file>res/add_contact.png</file>
|
||||||
|
<file>res/notification.png</file>
|
||||||
|
<file>res/rahmen-message.png</file>
|
||||||
|
<file>res/message-icon.svg</file>
|
||||||
|
<file>res/lock_green.png</file>
|
||||||
|
<file>res/lock_orange.png</file>
|
||||||
|
<file>res/unlocked.png</file>
|
||||||
|
<file>res/getAddrWhite.png</file>
|
||||||
|
<file>res/send-white.png</file>
|
||||||
|
<file>res/requestWhite.png</file>
|
||||||
|
<file>res/addContactWhite.png</file>
|
||||||
|
<file>res/getAddrBlack.png</file>
|
||||||
|
<file>res/sendBlack.png</file>
|
||||||
|
<file>res/requestBlack.png</file>
|
||||||
|
<file>res/addContactBlack.png</file>
|
||||||
|
<file>res/unknownBlack.png</file>
|
||||||
|
<file>res/unknownWhite.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="/img">
|
<qresource prefix="/img">
|
||||||
<file>res/hushdlogo.gif</file>
|
<file>res/hushdlogo.gif</file>
|
||||||
<file>res/logobig.gif</file>
|
<file>res/silentdragonlite-animated.gif</file>
|
||||||
|
<file>res/silentdragonlite-animated-dark.gif</file>
|
||||||
|
<file>res/silentdragonlite-animated-startup.gif</file>
|
||||||
|
<file>res/silentdragonlite-animated-startup-dark.gif</file>
|
||||||
|
<file>res/loaderblack.gif</file>
|
||||||
|
<file>res/loaderwhite.gif</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="/translations">
|
<qresource prefix="/translations">
|
||||||
<file>res/silentdragonlite_de.qm</file>
|
<file>res/silentdragonlite_de.qm</file>
|
||||||
<file>res/silentdragonlite_es.qm</file>
|
<file>res/silentdragonlite_es.qm</file>
|
||||||
<file>res/silentdragonlite_fr.qm</file>
|
<file>res/silentdragonlite_fr.qm</file>
|
||||||
<file>res/silentdragonlite_pt.qm</file>
|
<file>res/silentdragonlite_pt.qm</file>
|
||||||
<file>res/silentdragonlite_it.qm</file>
|
<file>res/silentdragonlite_it.qm</file>
|
||||||
<file>res/silentdragonlite_hr.qm</file>
|
<file>res/silentdragonlite_hr.qm</file>
|
||||||
<file>res/silentdragonlite_fa.qm</file>
|
<file>res/silentdragonlite_fa.qm</file>
|
||||||
|
<file>res/silentdragonlite_id.qm</file>
|
||||||
|
<file>res/silentdragonlite_ar.qm</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="/css">
|
<qresource prefix="/css">
|
||||||
<file>res/css/blue.css</file>
|
<file>res/css/Blue.css</file>
|
||||||
<file>res/css/dark.css</file>
|
<file>res/css/Dark.css</file>
|
||||||
<file>res/css/default.css</file>
|
<file>res/css/Default.css</file>
|
||||||
<file>res/css/light.css</file>
|
<file>res/css/Light.css</file>
|
||||||
|
<file>res/css/Midnight.css</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="/images/blue">
|
<qresource prefix="/images/blue">
|
||||||
<file>res/images/blue/unchecked.png</file>
|
<file>res/images/blue/unchecked.png</file>
|
||||||
|
|||||||
5
compile.log
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
Compiling SilentDragonLite 1.2.2 with 4 threads...
|
||||||
|
g++ -c -include bin/SilentDragonLite -pipe -g -std=gnu++1y -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQAPPLICATION_CLASS=QApplication -D_FORTIFY_SOURCE=2 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Isrc/3rdparty -Isrc -Isingleapplication -Ires -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtWebSockets -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -Ibin -Isrc -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o bin/mainwindow.o src/mainwindow.cpp
|
||||||
|
g++ -c -include bin/SilentDragonLite -pipe -g -std=gnu++1y -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQAPPLICATION_CLASS=QApplication -D_FORTIFY_SOURCE=2 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Isrc/3rdparty -Isrc -Isingleapplication -Ires -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtWebSockets -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -Ibin -Isrc -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o bin/sendtab.o src/sendtab.cpp
|
||||||
|
g++ -c -include bin/SilentDragonLite -pipe -g -std=gnu++1y -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQAPPLICATION_CLASS=QApplication -D_FORTIFY_SOURCE=2 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Isrc/3rdparty -Isrc -Isingleapplication -Ires -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtWebSockets -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -Ibin -Isrc -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o bin/addressbook.o src/addressbook.cpp
|
||||||
|
g++ -c -include bin/SilentDragonLite -pipe -g -std=gnu++1y -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQAPPLICATION_CLASS=QApplication -D_FORTIFY_SOURCE=2 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Isrc/3rdparty -Isrc -Isingleapplication -Ires -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtWebSockets -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -Ibin -Isrc -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o bin/addresscombo.o src/addresscombo.cpp
|
||||||
83
lib/Cargo.lock
generated
@@ -149,18 +149,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "bellman"
|
name = "bellman"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc#caaee693c47c2ee9ecd1e1546b8fe3c714f342bc"
|
source = "git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37#1a0204113d487cdaaf183c2967010e5214ff9e37"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bit-vec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bit-vec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"blake2s_simd 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
"blake2s_simd 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ff 0.4.0 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)",
|
"ff 0.4.0 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)",
|
||||||
"futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
"futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"group 0.1.0 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)",
|
"group 0.1.0 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)",
|
||||||
"num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"pairing 0.14.2 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)",
|
"pairing 0.14.2 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)",
|
||||||
"rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -424,17 +424,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ff"
|
name = "ff"
|
||||||
version = "0.4.0"
|
version = "0.4.0"
|
||||||
source = "git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc#caaee693c47c2ee9ecd1e1546b8fe3c714f342bc"
|
source = "git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37#1a0204113d487cdaaf183c2967010e5214ff9e37"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ff_derive 0.3.0 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)",
|
"ff_derive 0.3.0 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)",
|
||||||
"rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ff_derive"
|
name = "ff_derive"
|
||||||
version = "0.3.0"
|
version = "0.3.0"
|
||||||
source = "git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc#caaee693c47c2ee9ecd1e1546b8fe3c714f342bc"
|
source = "git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37#1a0204113d487cdaaf183c2967010e5214ff9e37"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"num-bigint 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"num-bigint 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
"num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -575,9 +575,9 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "group"
|
name = "group"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc#caaee693c47c2ee9ecd1e1546b8fe3c714f342bc"
|
source = "git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37#1a0204113d487cdaaf183c2967010e5214ff9e37"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ff 0.4.0 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)",
|
"ff 0.4.0 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)",
|
||||||
"rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rand_xorshift 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand_xorshift 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
@@ -996,11 +996,11 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "pairing"
|
name = "pairing"
|
||||||
version = "0.14.2"
|
version = "0.14.2"
|
||||||
source = "git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc#caaee693c47c2ee9ecd1e1546b8fe3c714f342bc"
|
source = "git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37#1a0204113d487cdaaf183c2967010e5214ff9e37"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ff 0.4.0 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)",
|
"ff 0.4.0 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)",
|
||||||
"group 0.1.0 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)",
|
"group 0.1.0 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)",
|
||||||
"rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1177,7 +1177,7 @@ version = "0.1.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"silentdragonlitelib 0.1.0 (git+https://github.com/MyHush/silentdragonlite-cli?rev=44f64181143be9b3747b54580943017b85d93cd7)",
|
"silentdragonlitelib 0.1.0 (git+https://github.com/MyHush/silentdragonlite-cli?rev=d2887d07879a93bdd9b2c8bd12504bb977e82fe0)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1640,21 +1640,22 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "silentdragonlitelib"
|
name = "silentdragonlitelib"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/MyHush/silentdragonlite-cli?rev=44f64181143be9b3747b54580943017b85d93cd7#44f64181143be9b3747b54580943017b85d93cd7"
|
source = "git+https://github.com/MyHush/silentdragonlite-cli?rev=d2887d07879a93bdd9b2c8bd12504bb977e82fe0#d2887d07879a93bdd9b2c8bd12504bb977e82fe0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bellman 0.1.0 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)",
|
"bellman 0.1.0 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)",
|
||||||
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"dirs 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"dirs 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ff 0.4.0 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)",
|
"ff 0.4.0 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)",
|
||||||
"hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"json 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"json 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libflate 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log4rs 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log4rs 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"pairing 0.14.2 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)",
|
"pairing 0.14.2 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)",
|
||||||
"prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"prost-types 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"prost-types 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"protobuf 2.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"protobuf 2.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -1672,9 +1673,9 @@ dependencies = [
|
|||||||
"tonic-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"tonic-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"webpki-roots 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"webpki-roots 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"zcash_client_backend 0.0.0 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)",
|
"zcash_client_backend 0.0.0 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)",
|
||||||
"zcash_primitives 0.0.0 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)",
|
"zcash_primitives 0.0.0 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)",
|
||||||
"zcash_proofs 0.0.0 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)",
|
"zcash_proofs 0.0.0 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -2383,34 +2384,34 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "zcash_client_backend"
|
name = "zcash_client_backend"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
source = "git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc#caaee693c47c2ee9ecd1e1546b8fe3c714f342bc"
|
source = "git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37#1a0204113d487cdaaf183c2967010e5214ff9e37"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bech32 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bech32 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bs58 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bs58 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ff 0.4.0 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)",
|
"ff 0.4.0 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)",
|
||||||
"hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"pairing 0.14.2 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)",
|
"pairing 0.14.2 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)",
|
||||||
"protobuf 2.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"protobuf 2.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"protobuf-codegen-pure 2.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"protobuf-codegen-pure 2.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"subtle 2.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"subtle 2.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"zcash_primitives 0.0.0 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)",
|
"zcash_primitives 0.0.0 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zcash_primitives"
|
name = "zcash_primitives"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
source = "git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc#caaee693c47c2ee9ecd1e1546b8fe3c714f342bc"
|
source = "git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37#1a0204113d487cdaaf183c2967010e5214ff9e37"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aes 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"aes 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"blake2b_simd 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
"blake2b_simd 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"blake2s_simd 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
"blake2s_simd 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"crypto_api_chachapoly 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"crypto_api_chachapoly 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ff 0.4.0 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)",
|
"ff 0.4.0 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)",
|
||||||
"fpe 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"fpe 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"pairing 0.14.2 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)",
|
"pairing 0.14.2 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)",
|
||||||
"rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rand_os 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand_os 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -2422,15 +2423,15 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "zcash_proofs"
|
name = "zcash_proofs"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
source = "git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc#caaee693c47c2ee9ecd1e1546b8fe3c714f342bc"
|
source = "git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37#1a0204113d487cdaaf183c2967010e5214ff9e37"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bellman 0.1.0 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)",
|
"bellman 0.1.0 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)",
|
||||||
"blake2b_simd 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
"blake2b_simd 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ff 0.4.0 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)",
|
"ff 0.4.0 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)",
|
||||||
"pairing 0.14.2 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)",
|
"pairing 0.14.2 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)",
|
||||||
"rand_os 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand_os 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"zcash_primitives 0.0.0 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)",
|
"zcash_primitives 0.0.0 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[metadata]
|
[metadata]
|
||||||
@@ -2455,7 +2456,7 @@ dependencies = [
|
|||||||
"checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e"
|
"checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e"
|
||||||
"checksum base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7"
|
"checksum base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7"
|
||||||
"checksum bech32 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cdcf67bb7ba7797a081cd19009948ab533af7c355d5caf1d08c777582d351e9c"
|
"checksum bech32 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cdcf67bb7ba7797a081cd19009948ab533af7c355d5caf1d08c777582d351e9c"
|
||||||
"checksum bellman 0.1.0 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)" = "<none>"
|
"checksum bellman 0.1.0 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)" = "<none>"
|
||||||
"checksum bit-vec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "02b4ff8b16e6076c3e14220b39fbc1fabb6737522281a388998046859400895f"
|
"checksum bit-vec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "02b4ff8b16e6076c3e14220b39fbc1fabb6737522281a388998046859400895f"
|
||||||
"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
|
"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
|
||||||
"checksum blake2b_simd 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d8fb2d74254a3a0b5cac33ac9f8ed0e44aa50378d9dbb2e5d83bd21ed1dc2c8a"
|
"checksum blake2b_simd 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d8fb2d74254a3a0b5cac33ac9f8ed0e44aa50378d9dbb2e5d83bd21ed1dc2c8a"
|
||||||
@@ -2491,8 +2492,8 @@ dependencies = [
|
|||||||
"checksum failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f8273f13c977665c5db7eb2b99ae520952fe5ac831ae4cd09d80c4c7042b5ed9"
|
"checksum failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f8273f13c977665c5db7eb2b99ae520952fe5ac831ae4cd09d80c4c7042b5ed9"
|
||||||
"checksum failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08"
|
"checksum failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08"
|
||||||
"checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
|
"checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
|
||||||
"checksum ff 0.4.0 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)" = "<none>"
|
"checksum ff 0.4.0 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)" = "<none>"
|
||||||
"checksum ff_derive 0.3.0 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)" = "<none>"
|
"checksum ff_derive 0.3.0 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)" = "<none>"
|
||||||
"checksum filetime 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1ff6d4dab0aa0c8e6346d46052e93b13a16cf847b54ed357087c35011048cc7d"
|
"checksum filetime 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1ff6d4dab0aa0c8e6346d46052e93b13a16cf847b54ed357087c35011048cc7d"
|
||||||
"checksum fixedbitset 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d"
|
"checksum fixedbitset 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d"
|
||||||
"checksum flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6bd6d6f4752952feb71363cffc9ebac9411b75b87c6ab6058c40c8900cf43c0f"
|
"checksum flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6bd6d6f4752952feb71363cffc9ebac9411b75b87c6ab6058c40c8900cf43c0f"
|
||||||
@@ -2510,7 +2511,7 @@ dependencies = [
|
|||||||
"checksum futures-util 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2c3f8c59707f898b8b6f0b54c2aef5408ae90a560b7bf0fbf1b95b3c652b0171"
|
"checksum futures-util 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2c3f8c59707f898b8b6f0b54c2aef5408ae90a560b7bf0fbf1b95b3c652b0171"
|
||||||
"checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec"
|
"checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec"
|
||||||
"checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb"
|
"checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb"
|
||||||
"checksum group 0.1.0 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)" = "<none>"
|
"checksum group 0.1.0 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)" = "<none>"
|
||||||
"checksum h2 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b9433d71e471c1736fd5a61b671fc0b148d7a2992f666c958d03cd8feb3b88d1"
|
"checksum h2 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b9433d71e471c1736fd5a61b671fc0b148d7a2992f666c958d03cd8feb3b88d1"
|
||||||
"checksum hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3bae29b6653b3412c2e71e9d486db9f9df5d701941d86683005efb9f2d28e3da"
|
"checksum hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3bae29b6653b3412c2e71e9d486db9f9df5d701941d86683005efb9f2d28e3da"
|
||||||
"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205"
|
"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205"
|
||||||
@@ -2557,7 +2558,7 @@ dependencies = [
|
|||||||
"checksum opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c"
|
"checksum opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c"
|
||||||
"checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de"
|
"checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de"
|
||||||
"checksum ordered-float 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "18869315e81473c951eb56ad5558bbc56978562d3ecfb87abb7a1e944cea4518"
|
"checksum ordered-float 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "18869315e81473c951eb56ad5558bbc56978562d3ecfb87abb7a1e944cea4518"
|
||||||
"checksum pairing 0.14.2 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)" = "<none>"
|
"checksum pairing 0.14.2 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)" = "<none>"
|
||||||
"checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337"
|
"checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337"
|
||||||
"checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9"
|
"checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9"
|
||||||
"checksum pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9"
|
"checksum pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9"
|
||||||
@@ -2630,7 +2631,7 @@ dependencies = [
|
|||||||
"checksum serde_yaml 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)" = "691b17f19fc1ec9d94ec0b5864859290dff279dbd7b03f017afda54eb36c3c35"
|
"checksum serde_yaml 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)" = "691b17f19fc1ec9d94ec0b5864859290dff279dbd7b03f017afda54eb36c3c35"
|
||||||
"checksum sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "27044adfd2e1f077f649f59deb9490d3941d674002f7d062870a60ebe9bd47a0"
|
"checksum sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "27044adfd2e1f077f649f59deb9490d3941d674002f7d062870a60ebe9bd47a0"
|
||||||
"checksum signal-hook-registry 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94f478ede9f64724c5d173d7bb56099ec3e2d9fc2774aac65d34b8b890405f41"
|
"checksum signal-hook-registry 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94f478ede9f64724c5d173d7bb56099ec3e2d9fc2774aac65d34b8b890405f41"
|
||||||
"checksum silentdragonlitelib 0.1.0 (git+https://github.com/MyHush/silentdragonlite-cli?rev=44f64181143be9b3747b54580943017b85d93cd7)" = "<none>"
|
"checksum silentdragonlitelib 0.1.0 (git+https://github.com/MyHush/silentdragonlite-cli?rev=d2887d07879a93bdd9b2c8bd12504bb977e82fe0)" = "<none>"
|
||||||
"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
|
"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
|
||||||
"checksum smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6"
|
"checksum smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6"
|
||||||
"checksum socket2 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)" = "e8b74de517221a2cb01a53349cf54182acdc31a074727d3079068448c0676d85"
|
"checksum socket2 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)" = "e8b74de517221a2cb01a53349cf54182acdc31a074727d3079068448c0676d85"
|
||||||
@@ -2706,6 +2707,6 @@ dependencies = [
|
|||||||
"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e"
|
"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e"
|
||||||
"checksum xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c"
|
"checksum xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c"
|
||||||
"checksum yaml-rust 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "65923dd1784f44da1d2c3dbbc5e822045628c590ba72123e1c73d3c230c4434d"
|
"checksum yaml-rust 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "65923dd1784f44da1d2c3dbbc5e822045628c590ba72123e1c73d3c230c4434d"
|
||||||
"checksum zcash_client_backend 0.0.0 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)" = "<none>"
|
"checksum zcash_client_backend 0.0.0 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)" = "<none>"
|
||||||
"checksum zcash_primitives 0.0.0 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)" = "<none>"
|
"checksum zcash_primitives 0.0.0 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)" = "<none>"
|
||||||
"checksum zcash_proofs 0.0.0 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)" = "<none>"
|
"checksum zcash_proofs 0.0.0 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)" = "<none>"
|
||||||
|
|||||||
@@ -11,4 +11,4 @@ crate-type = ["staticlib"]
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
libc = "0.2.58"
|
libc = "0.2.58"
|
||||||
lazy_static = "1.4.0"
|
lazy_static = "1.4.0"
|
||||||
silentdragonlitelib = { git = "https://github.com/MyHush/silentdragonlite-cli", rev = "44f64181143be9b3747b54580943017b85d93cd7" }
|
silentdragonlitelib = { git = "https://github.com/MyHush/silentdragonlite-cli", rev = "d2887d07879a93bdd9b2c8bd12504bb977e82fe0" }
|
||||||
|
|||||||
2
peda-session-SilentDragonLite.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
break FileSystem::readContactsOldFormat
|
||||||
|
|
||||||
BIN
res/Berg.png
Normal file
|
After Width: | Height: | Size: 68 KiB |
BIN
res/Denio.png
Normal file
|
After Width: | Height: | Size: 65 KiB |
BIN
res/Duke.png
Normal file
|
After Width: | Height: | Size: 75 KiB |
BIN
res/Elsa.png
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
res/Garfield.png
Normal file
|
After Width: | Height: | Size: 106 KiB |
BIN
res/Mickey.png
Normal file
|
After Width: | Height: | Size: 57 KiB |
BIN
res/Pinguin.png
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
res/Popey.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
res/SDLogo.png
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
res/Sharpee.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
res/Snoopy.png
Normal file
|
After Width: | Height: | Size: 45 KiB |
BIN
res/Stag.png
Normal file
|
After Width: | Height: | Size: 140 KiB |
BIN
res/Yoda.png
Normal file
|
After Width: | Height: | Size: 82 KiB |
BIN
res/addContactBlack.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
res/addContactWhite.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
res/add_contact.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
9
res/add_contact.svg
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 265.7 283.5" style="enable-background:new 0 0 265.7 283.5;" xml:space="preserve">
|
||||||
|
<g>
|
||||||
|
<path d="M132.9,0C59.8,0,0,59.8,0,132.9c0,73,59.8,132.9,132.9,132.9c73,0,132.9-59.8,132.9-132.9C265.7,59.8,205.9,0,132.9,0
|
||||||
|
L132.9,0z M199.3,146.2h-53.1v53.1h-26.6v-53.1H66.4v-26.6h53.1V66.4h26.6v53.1h53.1V146.2z M199.3,146.2"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 604 B |
7
res/addcontact.svg
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Svg Vector Icons : http://www.onlinewebfonts.com/icon -->
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
|
||||||
|
<metadata> Svg Vector Icons : http://www.onlinewebfonts.com/icon </metadata>
|
||||||
|
<g><path d="M870.2,797.3l-99.5-2.4l2.4-99.7c0.4-15.7-12.1-28.8-27.8-29.2c-15.7-0.4-28.8,12-29.2,27.8l-2.4,99.7l-99.6-2.4c-15.7-0.4-28.8,12.1-29.2,27.8c-0.4,15.7,12,28.8,27.8,29.2l99.6,2.4l-2.4,99.7c-0.4,15.7,12,28.8,27.8,29.2c15.7,0.4,28.8-12,29.2-27.8l2.4-99.6l99.5,2.4c15.6,0.4,28.8-12,29.2-27.8C898.3,810.8,885.9,797.7,870.2,797.3L870.2,797.3z"/><path d="M515.1,568.6c2.2,15.9,16.9,27.1,32.7,25.1c117.1-14.5,232.6,25.5,316.9,109.9c11.4,11.4,29.8,11.5,41.1,0.3c11.3-11.2,11.2-29.7-0.3-41.1C808.3,565.4,675,519.2,539.9,536C524.4,538,512.9,553.1,515.1,568.6z M113.8,990c15.9,0.5,29.2-12.2,29.7-28.4c6.3-209.1,178.4-374.1,383.6-367.9c158.1,4.8,290.6-122.2,295.5-283.1c4.8-160.9-119.8-295.7-277.9-300.5C386.6,5.4,254.1,132.4,249.2,293.3c-3.2,106.5,52.2,207,142.4,260.6C216.3,608.1,91.5,772.7,85.8,959.9C85.3,976,97.9,989.5,113.8,990z M542.9,68.8c126.3,3.8,225.8,111.5,221.9,240.1C761,437.5,655.2,539,528.9,535.1c-126.2-3.8-225.6-111.5-221.8-240.1C311,166.6,416.8,65.1,542.9,68.8z"/></g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
QWidget, QMainWindow, QMenuBar, QMenu, QDialog, QTabWidget, QTableView, QTableView::item, QScrollArea, QGroupBox, QPlainTextEdit, QLineEdit, QLabel, MainWindow
|
QWidget, QMainWindow, QMenuBar, QMenu, QDialog, QTabWidget, QTableView, QTableView::item, QScrollArea, QGroupBox, QPlainTextEdit, QLineEdit, QLabel, MainWindow, ChatModel, requestDialog
|
||||||
{
|
{
|
||||||
background-color: #303335;
|
background-color: #303335;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
@@ -25,7 +25,7 @@ QTabWidget QTabBar::tab:hover {
|
|||||||
background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.25, stop: 0 #747577, stop: 1 #3E4244);
|
background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.25, stop: 0 #747577, stop: 1 #3E4244);
|
||||||
color:#fff;
|
color:#fff;
|
||||||
border: 1px ridge #fff;
|
border: 1px ridge #fff;
|
||||||
min-height: 20px
|
min-height: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
QHeaderView { /* Table Header */
|
QHeaderView { /* Table Header */
|
||||||
139
res/css/Midnight.css
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
/*
|
||||||
|
Theme: Midnight Qt
|
||||||
|
Version: 1.0.2
|
||||||
|
Reference: https://doc.qt.io/qt-5/stylesheet-reference.html
|
||||||
|
|
||||||
|
Author: Charles Sharpe
|
||||||
|
Date: Apr. 23, 2020
|
||||||
|
Website: https://www.csharpe.me
|
||||||
|
License: https://opensource.org/licenses/MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
QWidget, QMainWindow, QMenuBar, QMenu, QDialog, QTabWidget, QTableView, QTableView::item, QScrollArea, QGroupBox, QPlainTextEdit, QLineEdit, QLabel, MainWindow
|
||||||
|
{
|
||||||
|
background-color: #111;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
QPushButton {
|
||||||
|
padding: 10px 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QPushButton:hover {
|
||||||
|
background: #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
QLineEdit, QRadioButton::indicator::unchecked, QCheckBox::indicator::unchecked {
|
||||||
|
background: #222;
|
||||||
|
border: 1px solid #333;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QLineEdit {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QLineEdit:focus {
|
||||||
|
border: 1px solid #9d8400;
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget QLabel {
|
||||||
|
font-size: 11pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget QCheckBox {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
QTabWidget QTabBar::tab {
|
||||||
|
min-height: 15px;
|
||||||
|
padding: 15px 25px;
|
||||||
|
border: 1px ridge #222;
|
||||||
|
left: 1px; /* Fix 1px alignment */
|
||||||
|
background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.25, stop: 0 #333, stop: 1 #111);
|
||||||
|
}
|
||||||
|
|
||||||
|
QTabWidget QTabBar::tab:selected {
|
||||||
|
background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.25, stop: 0 #555, stop: 1 #111);
|
||||||
|
color:#fff;
|
||||||
|
border: 1px ridge #222;
|
||||||
|
border-bottom: 0px; /* Overwrites border-bottom */
|
||||||
|
}
|
||||||
|
|
||||||
|
QTabWidget QTabBar::tab:hover {
|
||||||
|
background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.25, stop: 0 #555, stop: 1 #111);
|
||||||
|
}
|
||||||
|
|
||||||
|
QHeaderView { /* Table Header */
|
||||||
|
background-color:#111;
|
||||||
|
}
|
||||||
|
|
||||||
|
QHeaderView::section { /* Table Header Sections */
|
||||||
|
qproperty-alignment:center;
|
||||||
|
background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.25, stop: 0 #333, stop: 1 #111);
|
||||||
|
color:#fff;
|
||||||
|
min-height:25px;
|
||||||
|
font-weight:bold;
|
||||||
|
font-size:12px;
|
||||||
|
outline:0;
|
||||||
|
border:1px ridge #222;
|
||||||
|
padding: 2px 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QHeaderView::section:last {
|
||||||
|
border-right: 0px ridge #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
QScrollArea {
|
||||||
|
background:transparent;
|
||||||
|
border:0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QTableView { /* Table - has to be selected as a class otherwise it throws off QCalendarWidget */
|
||||||
|
background:#111;
|
||||||
|
}
|
||||||
|
|
||||||
|
QTableView::item { /* Table Item */
|
||||||
|
background-color:#111;
|
||||||
|
border:1px solid #222;
|
||||||
|
font-size:12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QTableView::item:selected { /* Table Item Selected */
|
||||||
|
background-color:#fff;
|
||||||
|
color:#000;
|
||||||
|
}
|
||||||
|
|
||||||
|
QMenuBar {
|
||||||
|
background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.25, stop: 0 #222, stop: 1 #111);
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
QMenuBar::item {
|
||||||
|
background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.25, stop: 0 #222, stop: 1 #111);
|
||||||
|
color: #fff;
|
||||||
|
padding: 5px 7px;
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QMenuBar::item:selected {
|
||||||
|
background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.25, stop: 0 #333, stop: 1 #111);
|
||||||
|
}
|
||||||
|
|
||||||
|
QMenu {
|
||||||
|
border:1px solid #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
QMenu::item {
|
||||||
|
padding: 7px 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QMenu::item:selected {
|
||||||
|
background: #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
QMenu::separator {
|
||||||
|
height: 1px;
|
||||||
|
margin: 3px 7px 3px 7px; /* space at ends of separator */
|
||||||
|
background: #222;
|
||||||
|
}
|
||||||
BIN
res/darkwing.png
Normal file
|
After Width: | Height: | Size: 174 KiB |
BIN
res/getAddrBlack.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
res/getAddrWhite.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
res/hushdark.png
Normal file
|
After Width: | Height: | Size: 49 KiB |
BIN
res/loaderblack.gif
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
res/loaderwhite.gif
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
res/lock.png
Normal file
|
After Width: | Height: | Size: 812 B |
7
res/lock.svg
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Svg Vector Icons : http://www.onlinewebfonts.com/icon -->
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
|
||||||
|
<metadata> Svg Vector Icons : http://www.onlinewebfonts.com/icon </metadata>
|
||||||
|
<g><path d="M500,10C229.4,10,10,229.4,10,500c0,270.6,219.4,490,490,490c270.6,0,490-219.4,490-490C990,229.4,770.6,10,500,10z M500,947.4C252.9,947.4,52.6,747.1,52.6,500C52.6,252.9,252.9,52.6,500,52.6c247.1,0,447.4,200.3,447.4,447.4C947.4,747.1,747.1,947.4,500,947.4z"/><path d="M452.1,392.4c0-24.5,6.4-83.1,69.2-83.1c59.7,0,69.2,52.2,69.2,83.1v18.1h52.2v-18.1c0-81-46.9-133.2-120.4-133.2c-73.5,0-120.4,52.2-120.4,133.2v18.1h52.2v-18.1H452.1z M641.7,427.6H400.9c-28.8,0-52.2,22.4-52.2,51.1V647c0,27.7,23.4,51.1,52.2,51.1h240.7c28.8,0,52.2-22.4,52.2-51.1V478.7C693.9,451,670.4,427.6,641.7,427.6L641.7,427.6z M538.3,575.6V614c0,9.6-7.5,17-17,17c-9.6,0-17-7.5-17-17v-38.3c-10.7-5.3-17-17-17-28.8c0-18.1,14.9-34.1,34.1-34.1s34.1,14.9,34.1,34.1C555.4,558.6,549,569.2,538.3,575.6L538.3,575.6z"/></g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
7
res/lock_blue.svg
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Svg Vector Icons : http://www.onlinewebfonts.com/icon -->
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg fill="#46a2da" width="16px" height="16px" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
|
||||||
|
<metadata> Svg Vector Icons : http://www.onlinewebfonts.com/icon </metadata>
|
||||||
|
<g><path d="M500,10C229.4,10,10,229.4,10,500c0,270.6,219.4,490,490,490c270.6,0,490-219.4,490-490C990,229.4,770.6,10,500,10z M500,947.4C252.9,947.4,52.6,747.1,52.6,500C52.6,252.9,252.9,52.6,500,52.6c247.1,0,447.4,200.3,447.4,447.4C947.4,747.1,747.1,947.4,500,947.4z"/><path d="M452.1,392.4c0-24.5,6.4-83.1,69.2-83.1c59.7,0,69.2,52.2,69.2,83.1v18.1h52.2v-18.1c0-81-46.9-133.2-120.4-133.2c-73.5,0-120.4,52.2-120.4,133.2v18.1h52.2v-18.1H452.1z M641.7,427.6H400.9c-28.8,0-52.2,22.4-52.2,51.1V647c0,27.7,23.4,51.1,52.2,51.1h240.7c28.8,0,52.2-22.4,52.2-51.1V478.7C693.9,451,670.4,427.6,641.7,427.6L641.7,427.6z M538.3,575.6V614c0,9.6-7.5,17-17,17c-9.6,0-17-7.5-17-17v-38.3c-10.7-5.3-17-17-17-28.8c0-18.1,14.9-34.1,34.1-34.1s34.1,14.9,34.1,34.1C555.4,558.6,549,569.2,538.3,575.6L538.3,575.6z"/></g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |
BIN
res/lock_green.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
7
res/lock_green.svg
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Svg Vector Icons : http://www.onlinewebfonts.com/icon -->
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg fill="#32dc15" width="16px" height="16px" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
|
||||||
|
<metadata> Svg Vector Icons : http://www.onlinewebfonts.com/icon </metadata>
|
||||||
|
<g><path d="M500,10C229.4,10,10,229.4,10,500c0,270.6,219.4,490,490,490c270.6,0,490-219.4,490-490C990,229.4,770.6,10,500,10z M500,947.4C252.9,947.4,52.6,747.1,52.6,500C52.6,252.9,252.9,52.6,500,52.6c247.1,0,447.4,200.3,447.4,447.4C947.4,747.1,747.1,947.4,500,947.4z"/><path d="M452.1,392.4c0-24.5,6.4-83.1,69.2-83.1c59.7,0,69.2,52.2,69.2,83.1v18.1h52.2v-18.1c0-81-46.9-133.2-120.4-133.2c-73.5,0-120.4,52.2-120.4,133.2v18.1h52.2v-18.1H452.1z M641.7,427.6H400.9c-28.8,0-52.2,22.4-52.2,51.1V647c0,27.7,23.4,51.1,52.2,51.1h240.7c28.8,0,52.2-22.4,52.2-51.1V478.7C693.9,451,670.4,427.6,641.7,427.6L641.7,427.6z M538.3,575.6V614c0,9.6-7.5,17-17,17c-9.6,0-17-7.5-17-17v-38.3c-10.7-5.3-17-17-17-28.8c0-18.1,14.9-34.1,34.1-34.1s34.1,14.9,34.1,34.1C555.4,558.6,549,569.2,538.3,575.6L538.3,575.6z"/></g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |
BIN
res/lock_orange.png
Normal file
|
After Width: | Height: | Size: 929 B |
BIN
res/mail.png
Normal file
|
After Width: | Height: | Size: 31 KiB |
9
res/message-icon.svg
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
|
||||||
|
<g id="XMLID_1_">
|
||||||
|
<polygon id="XMLID_3_" points="256,371.5 256,379 512,379 512,27.4 0,27.4 0,379 136.3,379 136.3,484.6 261,377.4 256,371.5
|
||||||
|
256,379 256,371.5 251,364.9 152.1,449.7 152.1,363.2 15.8,363.2 15.8,43.2 496.2,43.2 496.2,363.2 252.7,363.2 251,364.9 "/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 636 B |
BIN
res/notification.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
10
res/notification.svg
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 225.9 283.5" style="enable-background:new 0 0 225.9 283.5;" xml:space="preserve">
|
||||||
|
<g>
|
||||||
|
<path d="M113,265.7c14.6,0,26.5-11.9,26.5-26.6H86.4C86.4,253.8,98.4,265.7,113,265.7L113,265.7z M199.3,186v-73
|
||||||
|
c0-41.2-27.9-74.4-66.4-83.7v-9.4C132.9,9.3,123.6,0,113,0C102.3,0,93,9.3,93,19.9v9.4C54.5,38.5,26.6,71.8,26.6,113v73L0,212.6
|
||||||
|
v13.3h225.9v-13.3L199.3,186z M199.3,186"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 655 B |
BIN
res/rahmen-message.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
res/requestBlack.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
res/requestWhite.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
res/sdlogo2.png
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
res/send-new-white.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
19
res/send-new.svg
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 300.2 283.5" style="enable-background:new 0 0 300.2 283.5;" xml:space="preserve">
|
||||||
|
<!--<style type="text/css">-->
|
||||||
|
<!--.st0{clip-path:url(#SVGID_2_);}-->
|
||||||
|
<!--</style>-->
|
||||||
|
<g>
|
||||||
|
<!--<g>-->
|
||||||
|
<!--<defs>-->
|
||||||
|
<!--<rect id="SVGID_1_" x="2.6" width="297.6" height="265.7"/>-->
|
||||||
|
<!--</defs>-->
|
||||||
|
<!--<clipPath id="SVGID_2_">-->
|
||||||
|
<!--<use xlink:href="#SVGID_1_" style="overflow:visible;"/>-->
|
||||||
|
<!--</clipPath>-->
|
||||||
|
<path class="st0" d="M2.6,255.1l297.7-127.5L2.6,0v99.2l212.6,28.3L2.6,155.9V255.1z M2.6,255.1"/>
|
||||||
|
<!--</g>-->
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 808 B |
BIN
res/send-white.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
res/send.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
6
res/send.svg
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" ?><svg id="Layer_1" style="enable-background:new 0 0 137.3 139.3;" version="1.1" viewBox="0 0 137.3 139.3" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><style type="text/css">
|
||||||
|
.st0{fill:#2C8AAA;}
|
||||||
|
.st1{opacity:0.19;clip-path:url(#XMLID_39_);fill:#070808;}
|
||||||
|
.st2{fill:#FFFFFF;}
|
||||||
|
.st3{opacity:0.19;fill:#070808;}
|
||||||
|
</style><g id="XMLID_2671_"><g id="XMLID_2704_"><circle class="st0" cx="68.5" cy="69.6" id="XMLID_2708_" r="66.2"/><g id="XMLID_2705_"><defs><circle cx="68.7" cy="69.6" id="XMLID_2706_" r="66.2"/></defs><clipPath id="XMLID_39_"><use style="overflow:visible;" xlink:href="#XMLID_2706_"/></clipPath><polyline class="st1" id="XMLID_2707_" points="95.7,41 155.1,91.1 134,135.8 112,146.2 33.3,62.9 "/></g></g></g><g id="XMLID_2719_"><polygon class="st2" id="XMLID_2718_" points="74.3,103.9 95.7,41 33.3,62.9 50.9,76.8 60.4,76.8 60.3,86.1 "/><polygon class="st3" id="XMLID_2713_" points="60.7,84.9 95.7,41 50.9,76.8 60.4,76.8 "/><polygon class="st3" id="XMLID_2703_" points="60.4,76.8 95.7,41 60.3,86.1 "/></g></svg>
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
BIN
res/sendBlack.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
res/silentdragonlite-animated-dark.gif
Normal file
|
After Width: | Height: | Size: 406 KiB |
BIN
res/silentdragonlite-animated-startup-dark.gif
Normal file
|
After Width: | Height: | Size: 1.0 MiB |
BIN
res/silentdragonlite-animated-startup.gif
Normal file
|
After Width: | Height: | Size: 1015 KiB |
BIN
res/silentdragonlite-animated.gif
Normal file
|
After Width: | Height: | Size: 406 KiB |
BIN
res/silentdragonlite_ar.qm
Normal file
2651
res/silentdragonlite_ar.ts
Normal file
BIN
res/silentdragonlite_id.qm
Normal file
2002
res/silentdragonlite_id.ts
Normal file
BIN
res/unknownBlack.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
res/unknownWhite.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
res/unkownBlack.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
res/unlocked.png
Normal file
|
After Width: | Height: | Size: 1006 B |
@@ -13,6 +13,7 @@ PRECOMPILED_HEADER = src/precompiled.h
|
|||||||
QT += widgets
|
QT += widgets
|
||||||
QT += websockets
|
QT += websockets
|
||||||
|
|
||||||
|
|
||||||
TARGET = SilentDragonLite
|
TARGET = SilentDragonLite
|
||||||
|
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
@@ -33,6 +34,7 @@ mac: LIBS+= -Wl,-bind_at_load
|
|||||||
|
|
||||||
RESOURCES = application.qrc
|
RESOURCES = application.qrc
|
||||||
|
|
||||||
|
|
||||||
MOC_DIR = bin
|
MOC_DIR = bin
|
||||||
OBJECTS_DIR = bin
|
OBJECTS_DIR = bin
|
||||||
UI_DIR = src
|
UI_DIR = src
|
||||||
@@ -65,7 +67,24 @@ SOURCES += \
|
|||||||
src/datamodel.cpp \
|
src/datamodel.cpp \
|
||||||
src/controller.cpp \
|
src/controller.cpp \
|
||||||
src/liteinterface.cpp \
|
src/liteinterface.cpp \
|
||||||
src/camount.cpp
|
src/camount.cpp \
|
||||||
|
src/chatbubbleme.cpp \
|
||||||
|
src/chatbubblepartner.cpp \
|
||||||
|
src/chatmodel.cpp \
|
||||||
|
src/contactmodel.cpp \
|
||||||
|
src/DataStore/DataStore.cpp \
|
||||||
|
src/DataStore/ChatDataStore.cpp \
|
||||||
|
src/DataStore/SietchDataStore.cpp \
|
||||||
|
src/DataStore/ContactDataStore.cpp \
|
||||||
|
src/Model/ChatItem.cpp \
|
||||||
|
src/Model/ContactRequestChatItem.cpp \
|
||||||
|
src/Model/ContactItem.cpp \
|
||||||
|
src/Model/ContactRequest.cpp \
|
||||||
|
src/Chat/Helper/ChatIDGenerator.cpp \
|
||||||
|
src/Chat/Chat.cpp \
|
||||||
|
src/FileSystem/FileSystem.cpp \
|
||||||
|
src/Crypto/FileEncryption.cpp \
|
||||||
|
src/Crypto/passwd.cpp
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
src/firsttimewizard.h \
|
src/firsttimewizard.h \
|
||||||
@@ -94,10 +113,17 @@ HEADERS += \
|
|||||||
src/controller.h \
|
src/controller.h \
|
||||||
src/liteinterface.h \
|
src/liteinterface.h \
|
||||||
src/camount.h \
|
src/camount.h \
|
||||||
lib/silentdragonlitelib.h
|
lib/silentdragonlitelib.h \
|
||||||
|
src/chatbubbleme.h \
|
||||||
|
src/chatbubblepartner.h \
|
||||||
|
src/chatmodel.h \
|
||||||
|
src/contactmodel.h
|
||||||
|
|
||||||
FORMS += \
|
FORMS += \
|
||||||
|
src/contactrequest.ui \
|
||||||
|
src/deposithush.ui \
|
||||||
src/encryption.ui \
|
src/encryption.ui \
|
||||||
|
src/hushrequest.ui \
|
||||||
src/mainwindow.ui \
|
src/mainwindow.ui \
|
||||||
src/migration.ui \
|
src/migration.ui \
|
||||||
src/newseed.ui \
|
src/newseed.ui \
|
||||||
@@ -109,15 +135,20 @@ FORMS += \
|
|||||||
src/confirm.ui \
|
src/confirm.ui \
|
||||||
src/privkey.ui \
|
src/privkey.ui \
|
||||||
src/memodialog.ui \
|
src/memodialog.ui \
|
||||||
|
src/startupencryption.ui \
|
||||||
src/viewalladdresses.ui \
|
src/viewalladdresses.ui \
|
||||||
src/connection.ui \
|
src/connection.ui \
|
||||||
src/addressbook.ui \
|
src/addressbook.ui \
|
||||||
src/mobileappconnector.ui \
|
src/mobileappconnector.ui \
|
||||||
src/createhushconfdialog.ui \
|
src/createhushconfdialog.ui \
|
||||||
src/recurringdialog.ui \
|
src/recurringdialog.ui \
|
||||||
|
src/requestContactDialog.ui \
|
||||||
src/newrecurring.ui \
|
src/newrecurring.ui \
|
||||||
src/requestdialog.ui \
|
src/requestdialog.ui \
|
||||||
src/recurringmultiple.ui
|
src/removeencryption.ui \
|
||||||
|
src/recurringmultiple.ui \
|
||||||
|
src/chatbubbleme.ui \
|
||||||
|
src/chatbubblepartner.ui
|
||||||
|
|
||||||
|
|
||||||
TRANSLATIONS = res/silentdragonlite_es.ts \
|
TRANSLATIONS = res/silentdragonlite_es.ts \
|
||||||
@@ -129,10 +160,12 @@ TRANSLATIONS = res/silentdragonlite_es.ts \
|
|||||||
res/silentdragonlite_hr.ts \
|
res/silentdragonlite_hr.ts \
|
||||||
res/silentdragonlite_sr.ts \
|
res/silentdragonlite_sr.ts \
|
||||||
res/silentdragonlite_fa.ts \
|
res/silentdragonlite_fa.ts \
|
||||||
|
res/silentdragonlite_id.ts \
|
||||||
|
res/silentdragonlite_ar.ts \
|
||||||
res/silentdragonlite_tr.ts
|
res/silentdragonlite_tr.ts
|
||||||
|
|
||||||
include(singleapplication/singleapplication.pri)
|
include(singleapplication/singleapplication.pri)
|
||||||
DEFINES += QAPPLICATION_CLASS=QApplication
|
DEFINES += QAPPLICATION_CLASS=QApplication _FORTIFY_SOURCE=2
|
||||||
|
|
||||||
QMAKE_INFO_PLIST = res/Info.plist
|
QMAKE_INFO_PLIST = res/Info.plist
|
||||||
|
|
||||||
|
|||||||
101
src/Chat/Chat.cpp
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
// Copyright 2019-2020 The Hush developers
|
||||||
|
// GPLv3
|
||||||
|
|
||||||
|
#include "Chat.h"
|
||||||
|
#include "../addressbook.h"
|
||||||
|
#include "../DataStore/DataStore.h"
|
||||||
|
Chat::Chat() {}
|
||||||
|
|
||||||
|
ChatMemoEdit::ChatMemoEdit(QWidget* parent) : QTextEdit(parent) {
|
||||||
|
QObject::connect(this, &QTextEdit::textChanged, this, &ChatMemoEdit::updateDisplayChat);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChatMemoEdit::updateDisplayChat() {
|
||||||
|
QString txt = this->toPlainText();
|
||||||
|
if (lenDisplayLabelchat)
|
||||||
|
lenDisplayLabelchat->setText(QString::number(txt.toUtf8().size()) + "/" + QString::number(maxlenchat));
|
||||||
|
|
||||||
|
if (txt.toUtf8().size() <= maxlenchat) {
|
||||||
|
// Everything is fine
|
||||||
|
if (sendChatButton)
|
||||||
|
sendChatButton->setEnabled(true);
|
||||||
|
|
||||||
|
if (lenDisplayLabelchat)
|
||||||
|
lenDisplayLabelchat->setStyleSheet("");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Overweight
|
||||||
|
if (sendChatButton)
|
||||||
|
sendChatButton->setEnabled(false);
|
||||||
|
|
||||||
|
if (lenDisplayLabelchat)
|
||||||
|
lenDisplayLabelchat->setStyleSheet("color: red;");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChatMemoEdit::setMaxLenChat(int len) {
|
||||||
|
this->maxlenchat = len;
|
||||||
|
updateDisplayChat();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChatMemoEdit::SetSendChatButton(QPushButton* button) {
|
||||||
|
this->sendChatButton = button;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChatMemoEdit::setLenDisplayLabelChat(QLabel* label) {
|
||||||
|
this->lenDisplayLabelchat = label;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Chat::renderChatBox(Ui::MainWindow *ui, QListView *view, QLabel *label)
|
||||||
|
{
|
||||||
|
|
||||||
|
QStandardItemModel *chat = new QStandardItemModel();
|
||||||
|
DataStore::getChatDataStore()->dump(); // test to see if the chat items in datastore are correctly dumped to json
|
||||||
|
for (auto &p : AddressBook::getInstance()->getAllAddressLabels())
|
||||||
|
{
|
||||||
|
for (auto &c : DataStore::getChatDataStore()->getAllMemos())
|
||||||
|
{
|
||||||
|
|
||||||
|
if (
|
||||||
|
(p.getName() == ui->contactNameMemo->text().trimmed()) &&
|
||||||
|
(p.getPartnerAddress() == c.second.getAddress()) &&
|
||||||
|
(c.second.isOutgoing() == true))
|
||||||
|
{
|
||||||
|
|
||||||
|
QStandardItem *Items = new QStandardItem(c.second.toChatLine());
|
||||||
|
|
||||||
|
Items->setData(OUTGOING, Qt::UserRole + 1);
|
||||||
|
chat->appendRow(Items);
|
||||||
|
ui->listChat->setModel(chat);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ui->listChat->setModel(chat);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
(p.getName() == ui->contactNameMemo->text().trimmed()) &&
|
||||||
|
(p.getMyAddress() == c.second.getAddress()) &&
|
||||||
|
(c.second.isOutgoing() == false) &&
|
||||||
|
(c.second.getCid() == p.getCid())
|
||||||
|
)
|
||||||
|
{
|
||||||
|
QStandardItem *Items1 = new QStandardItem(c.second.toChatLine());
|
||||||
|
Items1->setData(INCOMING, Qt::UserRole + 1);
|
||||||
|
chat->appendRow(Items1);
|
||||||
|
ui->listChat->setModel(chat);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
ui->listChat->setModel(chat);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
34
src/Chat/Chat.h
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
#ifndef CHAT_H
|
||||||
|
#define CHAT_H
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
#include <QStandardItemModel>
|
||||||
|
#include <QAbstractItemDelegate>
|
||||||
|
#include <QPainter>
|
||||||
|
#include <map>
|
||||||
|
#include <vector>
|
||||||
|
#include <QListView>
|
||||||
|
#include "precompiled.h"
|
||||||
|
#include "mainwindow.h"
|
||||||
|
#include "controller.h"
|
||||||
|
#include "settings.h"
|
||||||
|
#include "camount.h"
|
||||||
|
|
||||||
|
#include "../Model/ChatItem.h"
|
||||||
|
|
||||||
|
|
||||||
|
class Chat // Chat Controller
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
QTableView* parent;
|
||||||
|
Ui::MainWindow* ui;
|
||||||
|
MainWindow* main;
|
||||||
|
std::map<QString, QString> cidMap;
|
||||||
|
std::map<QString, QString> requestZaddrMap;
|
||||||
|
public:
|
||||||
|
Chat();
|
||||||
|
void renderChatBox(Ui::MainWindow* ui, QListView *view, QLabel *label); // action
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
193
src/Chat/Helper/ChatDelegator.h
Normal file
@@ -0,0 +1,193 @@
|
|||||||
|
// Copyright 2019-2020 The Hush developers
|
||||||
|
// GPLv3
|
||||||
|
|
||||||
|
#ifndef CHATDELEGATOR_H
|
||||||
|
#define CHATDELEGATOR_H
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
#include <QStandardItemModel>
|
||||||
|
#include <QAbstractItemDelegate>
|
||||||
|
#include <QPainter>
|
||||||
|
|
||||||
|
enum RenderType
|
||||||
|
{
|
||||||
|
OUTGOING=0,
|
||||||
|
INCOMING=1,
|
||||||
|
INDATE=2,
|
||||||
|
OUTDATE=3
|
||||||
|
};
|
||||||
|
|
||||||
|
class ListViewDelegate : public QAbstractItemDelegate
|
||||||
|
{
|
||||||
|
int d_radius;
|
||||||
|
int d_toppadding;
|
||||||
|
int d_bottompadding;
|
||||||
|
int d_leftpadding;
|
||||||
|
int d_rightpadding;
|
||||||
|
int d_verticalmargin;
|
||||||
|
int d_horizontalmargin;
|
||||||
|
int d_pointerwidth;
|
||||||
|
int d_pointerheight;
|
||||||
|
float d_widthfraction;
|
||||||
|
public:
|
||||||
|
inline ListViewDelegate(QObject *parent = nullptr);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
inline void paint(QPainter *painter, QStyleOptionViewItem const &option, QModelIndex const &index) const;
|
||||||
|
inline QSize sizeHint(QStyleOptionViewItem const &option, QModelIndex const &index) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
inline ListViewDelegate::ListViewDelegate(QObject *parent): QAbstractItemDelegate(parent), d_radius(5), d_toppadding(5), d_bottompadding(3), d_leftpadding(5), d_rightpadding(5), d_verticalmargin(5), d_horizontalmargin(10), d_pointerwidth(4), d_pointerheight(17), d_widthfraction(.6)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void ListViewDelegate::paint(QPainter *painter, QStyleOptionViewItem const &option, QModelIndex const &index) const
|
||||||
|
{
|
||||||
|
QTextDocument bodydoc;
|
||||||
|
QTextOption textOption(bodydoc.defaultTextOption());
|
||||||
|
textOption.setWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere);
|
||||||
|
bodydoc.setDefaultTextOption(textOption);
|
||||||
|
bodydoc.setDefaultFont(QFont("Roboto", 12));
|
||||||
|
QString bodytext(index.data(Qt::DisplayRole).toString());
|
||||||
|
bodydoc.setHtml(bodytext);
|
||||||
|
qreal contentswidth = option.rect.width() * d_widthfraction - d_horizontalmargin - d_pointerwidth - d_leftpadding - d_rightpadding;
|
||||||
|
bodydoc.setTextWidth(contentswidth);
|
||||||
|
qreal bodyheight = bodydoc.size().height();
|
||||||
|
int outgoing = index.data(Qt::UserRole + 1).toInt();
|
||||||
|
int outdate = index.data(Qt::UserRole + 1).toInt();
|
||||||
|
painter->save();
|
||||||
|
painter->setRenderHint(QPainter::Antialiasing);
|
||||||
|
|
||||||
|
// uncomment to see the area provided to paint this item
|
||||||
|
|
||||||
|
//painter->drawRect(option.rect);
|
||||||
|
|
||||||
|
painter->translate(option.rect.left() + d_horizontalmargin, option.rect.top() + ((index.row() == 0) ? d_verticalmargin : 0));
|
||||||
|
|
||||||
|
QColor bgcolor("#ffffff");
|
||||||
|
switch(outgoing)
|
||||||
|
{
|
||||||
|
case INDATE:
|
||||||
|
bgcolor = "transparent";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case OUTDATE:
|
||||||
|
bgcolor = "transparent";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case OUTGOING:
|
||||||
|
bgcolor = "#f8f9fa";
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
case INCOMING:
|
||||||
|
bgcolor = "#535353";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// create chat bubble
|
||||||
|
QPainterPath pointie;
|
||||||
|
|
||||||
|
// left bottom
|
||||||
|
pointie.moveTo(0, bodyheight + d_toppadding + d_bottompadding);
|
||||||
|
|
||||||
|
// right bottom
|
||||||
|
pointie.lineTo(0 + contentswidth + d_pointerwidth + d_leftpadding + d_rightpadding - d_radius,
|
||||||
|
bodyheight + d_toppadding + d_bottompadding);
|
||||||
|
pointie.arcTo(0 + contentswidth + d_pointerwidth + d_leftpadding + d_rightpadding - 2 * d_radius,
|
||||||
|
bodyheight + d_toppadding + d_bottompadding - 2 * d_radius,
|
||||||
|
2 * d_radius, 2 * d_radius, 270, 90);
|
||||||
|
|
||||||
|
// right top
|
||||||
|
pointie.lineTo(0 + contentswidth + d_pointerwidth + d_leftpadding + d_rightpadding, 0 + d_radius);
|
||||||
|
pointie.arcTo(0 + contentswidth + d_pointerwidth + d_leftpadding + d_rightpadding - 2 * d_radius, 0,
|
||||||
|
2 * d_radius, 2 * d_radius, 0, 90);
|
||||||
|
|
||||||
|
// left top
|
||||||
|
pointie.lineTo(0 + d_pointerwidth + d_radius, 0);
|
||||||
|
pointie.arcTo(0 + d_pointerwidth, 0, 2 * d_radius, 2 * d_radius, 90, 90);
|
||||||
|
|
||||||
|
// left bottom almost (here is the pointie)
|
||||||
|
pointie.lineTo(0 + d_pointerwidth, bodyheight + d_toppadding + d_bottompadding - d_pointerheight);
|
||||||
|
pointie.closeSubpath();
|
||||||
|
|
||||||
|
// rotate bubble for outgoing messages
|
||||||
|
if ((outgoing == OUTGOING) || (outdate == OUTDATE))
|
||||||
|
{
|
||||||
|
painter->translate(option.rect.width() - pointie.boundingRect().width() - d_horizontalmargin - d_pointerwidth, 0);
|
||||||
|
painter->translate(pointie.boundingRect().center());
|
||||||
|
painter->rotate(180);
|
||||||
|
painter->translate(-pointie.boundingRect().center());
|
||||||
|
}
|
||||||
|
|
||||||
|
// now paint it!
|
||||||
|
painter->setPen(QPen(bgcolor));
|
||||||
|
painter->drawPath(pointie);
|
||||||
|
painter->fillPath(pointie, QBrush(bgcolor));
|
||||||
|
|
||||||
|
// rotate back or painter is going to paint the text rotated...
|
||||||
|
if ((outgoing == OUTGOING) || (outdate == OUTDATE))
|
||||||
|
{
|
||||||
|
painter->translate(pointie.boundingRect().center());
|
||||||
|
painter->rotate(-180);
|
||||||
|
painter->translate(-pointie.boundingRect().center());
|
||||||
|
}
|
||||||
|
|
||||||
|
// set text color used to draw message body
|
||||||
|
QAbstractTextDocumentLayout::PaintContext ctx;
|
||||||
|
switch(outgoing)
|
||||||
|
{
|
||||||
|
case INDATE:
|
||||||
|
ctx.palette.setColor(QPalette::Text, QColor("Black"));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case OUTDATE:
|
||||||
|
ctx.palette.setColor(QPalette::Text, QColor("Black"));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case OUTGOING:
|
||||||
|
ctx.palette.setColor(QPalette::Text, QColor("Black"));
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
case INCOMING:
|
||||||
|
ctx.palette.setColor(QPalette::Text, QColor("whitesmoke"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// draw body text
|
||||||
|
painter->translate((outgoing == OUTGOING ? 0 : d_pointerwidth) + d_leftpadding, 0);
|
||||||
|
painter->translate((outdate == OUTDATE ? 0 : d_pointerwidth) + d_leftpadding, 0);
|
||||||
|
bodydoc.documentLayout()->draw(painter, ctx);
|
||||||
|
|
||||||
|
painter->restore();
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QSize ListViewDelegate::sizeHint(QStyleOptionViewItem const &option, QModelIndex const &index) const
|
||||||
|
{
|
||||||
|
QTextDocument bodydoc;
|
||||||
|
QTextOption textOption(bodydoc.defaultTextOption());
|
||||||
|
textOption.setWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere);
|
||||||
|
bodydoc.setDefaultTextOption(textOption);
|
||||||
|
bodydoc.setDefaultFont(QFont("Roboto", 12));
|
||||||
|
QString bodytext(index.data(Qt::DisplayRole).toString());
|
||||||
|
bodydoc.setHtml(bodytext);
|
||||||
|
|
||||||
|
// the width of the contents are the (a fraction of the window width) minus (margins + padding + width of the bubble's tail)
|
||||||
|
qreal contentswidth = option.rect.width() * d_widthfraction - d_horizontalmargin - d_pointerwidth - d_leftpadding - d_rightpadding;
|
||||||
|
|
||||||
|
// set this available width on the text document
|
||||||
|
bodydoc.setTextWidth(contentswidth);
|
||||||
|
|
||||||
|
QSize size(bodydoc.idealWidth() + d_horizontalmargin + d_pointerwidth + d_leftpadding + d_rightpadding,
|
||||||
|
bodydoc.size().height() + d_bottompadding + d_toppadding + d_verticalmargin + 1); // I dont remember why +1, haha, might not be necessary
|
||||||
|
|
||||||
|
if (index.row() == 0) // have extra margin at top of first item
|
||||||
|
size += QSize(0, d_verticalmargin);
|
||||||
|
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
28
src/Chat/Helper/ChatIDGenerator.cpp
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
#include "ChatIDGenerator.h"
|
||||||
|
|
||||||
|
ChatIDGenerator* ChatIDGenerator::getInstance()
|
||||||
|
{
|
||||||
|
if(ChatIDGenerator::instance == nullptr)
|
||||||
|
ChatIDGenerator::instance = new ChatIDGenerator();
|
||||||
|
|
||||||
|
return ChatIDGenerator::instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString ChatIDGenerator::generateID(ChatItem item)
|
||||||
|
{
|
||||||
|
QString key = QString::number(item.getTimestamp()) + QString("-");
|
||||||
|
key += QString(
|
||||||
|
QCryptographicHash::hash(
|
||||||
|
QString(
|
||||||
|
QString::number(item.getTimestamp()) +
|
||||||
|
item.getAddress() +
|
||||||
|
item.getContact() +
|
||||||
|
item.getMemo()
|
||||||
|
).toUtf8(),
|
||||||
|
QCryptographicHash::Md5
|
||||||
|
).toHex()
|
||||||
|
);
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
|
||||||
|
ChatIDGenerator* ChatIDGenerator::instance = nullptr;
|
||||||
18
src/Chat/Helper/ChatIDGenerator.h
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#ifndef CHATIDGENERATOR_H
|
||||||
|
#define CHATIDGENERATOR_H
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
#include <QUuid>
|
||||||
|
#include "../../Model/ChatItem.h"
|
||||||
|
|
||||||
|
class ChatIDGenerator
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
static ChatIDGenerator* instance;
|
||||||
|
|
||||||
|
public:
|
||||||
|
static ChatIDGenerator* getInstance();
|
||||||
|
QString generateID(ChatItem item);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
114
src/Crypto/FileEncryption.cpp
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
#include "FileEncryption.h"
|
||||||
|
|
||||||
|
void FileEncryption::showConfig()
|
||||||
|
{
|
||||||
|
qInfo() << FILEENCRYPTION_CHUNK_SIZE;
|
||||||
|
}
|
||||||
|
|
||||||
|
int FileEncryption::encrypt(QString target_file, QString source_file, const unsigned char key[crypto_secretstream_xchacha20poly1305_KEYBYTES])
|
||||||
|
{
|
||||||
|
unsigned char plain_data[FILEENCRYPTION_CHUNK_SIZE];
|
||||||
|
unsigned char cipher_data[FILEENCRYPTION_CHUNK_SIZE + crypto_secretstream_xchacha20poly1305_ABYTES];
|
||||||
|
unsigned char header[crypto_secretstream_xchacha20poly1305_HEADERBYTES];
|
||||||
|
crypto_secretstream_xchacha20poly1305_state state;
|
||||||
|
FILE *target, *source;
|
||||||
|
unsigned long long cipher_len;
|
||||||
|
size_t rlen;
|
||||||
|
int eof;
|
||||||
|
unsigned char tag;
|
||||||
|
|
||||||
|
if(!FileEncryption::exists(source_file.toStdString()))
|
||||||
|
{
|
||||||
|
qDebug() << "File not exits" << source_file;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
source = fopen(source_file.toStdString().c_str(), "rb");
|
||||||
|
target = fopen(target_file.toStdString().c_str(), "wb");
|
||||||
|
crypto_secretstream_xchacha20poly1305_init_push(&state, header, key);
|
||||||
|
fwrite(header, 1, sizeof header, target);
|
||||||
|
do
|
||||||
|
{
|
||||||
|
rlen = fread(plain_data, 1, sizeof plain_data, source);
|
||||||
|
eof = feof(source);
|
||||||
|
tag = eof ? crypto_secretstream_xchacha20poly1305_TAG_FINAL : 0;
|
||||||
|
crypto_secretstream_xchacha20poly1305_push(
|
||||||
|
&state,
|
||||||
|
cipher_data,
|
||||||
|
&cipher_len,
|
||||||
|
plain_data,
|
||||||
|
rlen,
|
||||||
|
NULL,
|
||||||
|
0,
|
||||||
|
tag
|
||||||
|
);
|
||||||
|
|
||||||
|
fwrite(cipher_data, 1, (size_t) cipher_len, target);
|
||||||
|
}
|
||||||
|
while (! eof);
|
||||||
|
|
||||||
|
fclose(target);
|
||||||
|
fclose(source);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int FileEncryption::decrypt(QString target_file, QString source_file, const unsigned char key[crypto_secretstream_xchacha20poly1305_KEYBYTES])
|
||||||
|
{
|
||||||
|
unsigned char buf_in[FILEENCRYPTION_CHUNK_SIZE + crypto_secretstream_xchacha20poly1305_ABYTES];
|
||||||
|
unsigned char buf_out[FILEENCRYPTION_CHUNK_SIZE];
|
||||||
|
unsigned char header[crypto_secretstream_xchacha20poly1305_HEADERBYTES];
|
||||||
|
crypto_secretstream_xchacha20poly1305_state st;
|
||||||
|
FILE *fp_t, *fp_s;
|
||||||
|
unsigned long long out_len;
|
||||||
|
size_t rlen;
|
||||||
|
int eof;
|
||||||
|
int ret = -1;
|
||||||
|
unsigned char tag;
|
||||||
|
|
||||||
|
if(!FileEncryption::exists(source_file.toStdString()))
|
||||||
|
{
|
||||||
|
qDebug() << "File not exits" << source_file;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
fp_s = fopen(source_file.toStdString().c_str(), "rb");
|
||||||
|
fp_t = fopen(target_file.toStdString().c_str(), "wb");
|
||||||
|
fread(header, 1, sizeof header, fp_s);
|
||||||
|
if (crypto_secretstream_xchacha20poly1305_init_pull(&st, header, key) != 0)
|
||||||
|
{
|
||||||
|
goto ret; /* incomplete header */
|
||||||
|
}
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
rlen = fread(buf_in, 1, sizeof buf_in, fp_s);
|
||||||
|
eof = feof(fp_s);
|
||||||
|
if (crypto_secretstream_xchacha20poly1305_pull(
|
||||||
|
&st,
|
||||||
|
buf_out,
|
||||||
|
&out_len,
|
||||||
|
&tag,
|
||||||
|
buf_in,
|
||||||
|
rlen,
|
||||||
|
NULL,
|
||||||
|
0
|
||||||
|
) != 0)
|
||||||
|
{
|
||||||
|
goto ret; /* corrupted chunk */
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tag == crypto_secretstream_xchacha20poly1305_TAG_FINAL && ! eof)
|
||||||
|
{
|
||||||
|
goto ret; /* premature end (end of file reached before the end of the stream) */
|
||||||
|
}
|
||||||
|
|
||||||
|
fwrite(buf_out, 1, (size_t) out_len, fp_t);
|
||||||
|
}
|
||||||
|
while (! eof);
|
||||||
|
ret = 0;
|
||||||
|
|
||||||
|
ret:
|
||||||
|
fclose(fp_t);
|
||||||
|
fclose(fp_s);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
24
src/Crypto/FileEncryption.h
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
#ifndef FILEENCRYPTION_H
|
||||||
|
#define FILEENCRYPTION_H
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <sodium.h>
|
||||||
|
#include <QString>
|
||||||
|
#include <fstream>
|
||||||
|
|
||||||
|
#define FILEENCRYPTION_CHUNK_SIZE 4096
|
||||||
|
|
||||||
|
class FileEncryption
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
inline static bool exists (const std::string& name) {
|
||||||
|
std::ifstream f(name.c_str());
|
||||||
|
return f.good();
|
||||||
|
}
|
||||||
|
public:
|
||||||
|
static void showConfig();
|
||||||
|
static int encrypt(QString target_file, QString source_file, const unsigned char key[crypto_secretstream_xchacha20poly1305_KEYBYTES]);
|
||||||
|
static int decrypt(QString target_file, QString source_file, const unsigned char key[crypto_secretstream_xchacha20poly1305_KEYBYTES]);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
60
src/Crypto/passwd.cpp
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
#include "passwd.h"
|
||||||
|
|
||||||
|
void PASSWD::show_hex_buff(unsigned char buf[])
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (uint8_t i=0; i < crypto_secretstream_xchacha20poly1305_KEYBYTES; i++)
|
||||||
|
printf("%02X ", buf[i]);
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
const unsigned char* PASSWD::key(QString password)
|
||||||
|
{
|
||||||
|
|
||||||
|
int length = password.length();
|
||||||
|
|
||||||
|
char *sequence = NULL;
|
||||||
|
sequence = new char[length+1];
|
||||||
|
strncpy(sequence, password.toLocal8Bit(), length +1);
|
||||||
|
|
||||||
|
#define MESSAGE ((const unsigned char *) sequence)
|
||||||
|
#define MESSAGE_LEN length
|
||||||
|
|
||||||
|
unsigned char hash[crypto_secretstream_xchacha20poly1305_KEYBYTES];
|
||||||
|
|
||||||
|
crypto_hash_sha256(hash, MESSAGE, MESSAGE_LEN);
|
||||||
|
|
||||||
|
qDebug()<<"Generating SaltHash from password: " <<sequence;
|
||||||
|
|
||||||
|
|
||||||
|
/////////we use the Hash of the Password as Salt, not perfect but still a good solution.
|
||||||
|
|
||||||
|
#define PASSWORD sequence
|
||||||
|
#define KEY_LEN crypto_box_SEEDBYTES
|
||||||
|
|
||||||
|
unsigned char key[KEY_LEN];
|
||||||
|
|
||||||
|
if (crypto_pwhash
|
||||||
|
(key, sizeof key, PASSWORD, strlen(PASSWORD), hash,
|
||||||
|
crypto_pwhash_OPSLIMIT_SENSITIVE, crypto_pwhash_MEMLIMIT_SENSITIVE,
|
||||||
|
crypto_pwhash_ALG_DEFAULT) != 0) {
|
||||||
|
/* out of memory */
|
||||||
|
}
|
||||||
|
|
||||||
|
qDebug()<<"Generating cryptographic key from password: " <<sequence;
|
||||||
|
|
||||||
|
|
||||||
|
// crypto_generichash(blacke2hash, sizeof hash, MESSAGE, MESSAGE_LEN, NULL, 0);
|
||||||
|
|
||||||
|
//for(uint8_t i = 0; i < crypto_secretstream_xchacha20poly1305_KEYBYTES/2; i++)
|
||||||
|
// hash[i] = blacke2hash[i];
|
||||||
|
|
||||||
|
// for(uint8_t i = crypto_secretstream_xchacha20poly1305_KEYBYTES/2; i < crypto_secretstream_xchacha20poly1305_KEYBYTES; i++)
|
||||||
|
// hash[i] = sha256hash[i];
|
||||||
|
|
||||||
|
// delete[] sha256hash;
|
||||||
|
//delete[] blacke2hash;
|
||||||
|
qDebug()<<"secret key generated:\n";
|
||||||
|
PASSWD::show_hex_buff(key);
|
||||||
|
return key;
|
||||||
|
}
|
||||||
14
src/Crypto/passwd.h
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#ifndef PASSWD_H
|
||||||
|
#define PASSWD_H
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <sodium.h>
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
|
class PASSWD
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static void show_hex_buff(unsigned char buf[]);
|
||||||
|
static const unsigned char* key(QString);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
127
src/DataStore/ChatDataStore.cpp
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
// Copyright 2019-2020 The Hush developers
|
||||||
|
// GPLv3
|
||||||
|
|
||||||
|
#include "ChatDataStore.h"
|
||||||
|
#include "addressbook.h"
|
||||||
|
#include "chatmodel.h"
|
||||||
|
|
||||||
|
|
||||||
|
ChatDataStore* ChatDataStore::getInstance()
|
||||||
|
{
|
||||||
|
if(!ChatDataStore::instanced)
|
||||||
|
{
|
||||||
|
ChatDataStore::instanced = true;
|
||||||
|
ChatDataStore::instance = new ChatDataStore();
|
||||||
|
}
|
||||||
|
|
||||||
|
return ChatDataStore::instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChatDataStore::clear()
|
||||||
|
{
|
||||||
|
this->data.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ChatDataStore::setData(QString key, ChatItem value)
|
||||||
|
{
|
||||||
|
this->data[key] = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
ChatItem ChatDataStore::getData(QString key)
|
||||||
|
{
|
||||||
|
return this->data[key];
|
||||||
|
}
|
||||||
|
|
||||||
|
QString ChatDataStore::getPassword()
|
||||||
|
{
|
||||||
|
|
||||||
|
return _password;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChatDataStore::setPassword(QString password)
|
||||||
|
{
|
||||||
|
|
||||||
|
_password = password;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString ChatDataStore::dump()
|
||||||
|
{
|
||||||
|
json chats;
|
||||||
|
chats["count"] = this->data.size();
|
||||||
|
json j = {};
|
||||||
|
for (auto &c: this->data)
|
||||||
|
{
|
||||||
|
j.push_back(c.second.toJson());
|
||||||
|
}
|
||||||
|
chats["chatitems"] = j;
|
||||||
|
return QString::fromStdString(chats.dump());
|
||||||
|
}
|
||||||
|
|
||||||
|
std::map<QString, ChatItem> ChatDataStore::getAllRawChatItems()
|
||||||
|
{
|
||||||
|
return this->data;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::map<QString, ChatItem> ChatDataStore::getAllNewContactRequests()
|
||||||
|
{
|
||||||
|
std::map<QString, ChatItem> filteredItems;
|
||||||
|
|
||||||
|
for(auto &c: this->data)
|
||||||
|
{
|
||||||
|
if (
|
||||||
|
(c.second.isOutgoing() == false) &&
|
||||||
|
(c.second.getType() == "Cont") &&
|
||||||
|
(c.second.isContact() == false) &&
|
||||||
|
(c.second.getMemo().startsWith("{"))
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
{
|
||||||
|
filteredItems[c.first] = c.second;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return filteredItems;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::map<QString, ChatItem> ChatDataStore::getAllOldContactRequests()
|
||||||
|
{
|
||||||
|
std::map<QString, ChatItem> filteredItems;
|
||||||
|
|
||||||
|
for(auto &c: this->data)
|
||||||
|
{
|
||||||
|
if (
|
||||||
|
(c.second.isOutgoing() == false) &&
|
||||||
|
(c.second.getType() == "Cont") &&
|
||||||
|
(c.second.isContact() == true) &&
|
||||||
|
(c.second.getMemo().startsWith("{"))
|
||||||
|
)
|
||||||
|
{
|
||||||
|
filteredItems[c.first] = c.second;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return filteredItems;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::map<QString, ChatItem> ChatDataStore::getAllMemos()
|
||||||
|
{
|
||||||
|
std::map<QString, ChatItem> filteredItems;
|
||||||
|
for(auto &c: this->data)
|
||||||
|
{
|
||||||
|
if (
|
||||||
|
|
||||||
|
(c.second.getMemo().startsWith("{") == false) &&
|
||||||
|
(c.second.getMemo().isEmpty() == false)
|
||||||
|
|
||||||
|
|
||||||
|
)
|
||||||
|
{
|
||||||
|
filteredItems[c.first] = c.second;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return filteredItems;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ChatDataStore* ChatDataStore::instance = nullptr;
|
||||||
|
bool ChatDataStore::instanced = false;
|
||||||
44
src/DataStore/ChatDataStore.h
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
#ifndef CHATDATASTORE_H
|
||||||
|
#define CHATDATASTORE_H
|
||||||
|
#include "../chatmodel.h"
|
||||||
|
using json = nlohmann::json;
|
||||||
|
|
||||||
|
class ChatDataStore
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
static bool instanced;
|
||||||
|
static ChatDataStore* instance;
|
||||||
|
Ui::MainWindow* ui;
|
||||||
|
MainWindow* main;
|
||||||
|
std::map<QString, ChatItem> data;
|
||||||
|
ChatDataStore()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
static ChatDataStore* getInstance();
|
||||||
|
void clear();
|
||||||
|
void setData(QString key, ChatItem value);
|
||||||
|
ChatItem getData(QString key);
|
||||||
|
std::map<QString, ChatItem> getAllRawChatItems();
|
||||||
|
std::map<QString, ChatItem> getAllNewContactRequests();
|
||||||
|
std::map<QString, ChatItem> getAllOldContactRequests();
|
||||||
|
std::map<QString, ChatItem> getAllMemos();
|
||||||
|
QString getPassword();
|
||||||
|
|
||||||
|
void setPassword(QString Password);
|
||||||
|
QString _password;
|
||||||
|
|
||||||
|
QString dump();
|
||||||
|
|
||||||
|
~ChatDataStore()
|
||||||
|
{
|
||||||
|
ChatDataStore::instanced = false;
|
||||||
|
ChatDataStore::instance = nullptr;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
50
src/DataStore/ContactDataStore.cpp
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
// Copyright 2019-2020 The Hush developers
|
||||||
|
// GPLv3
|
||||||
|
|
||||||
|
#include "ContactDataStore.h"
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
ContactDataStore* ContactDataStore::getInstance()
|
||||||
|
{
|
||||||
|
if(!ContactDataStore::instanced)
|
||||||
|
{
|
||||||
|
ContactDataStore::instanced = true;
|
||||||
|
ContactDataStore::instance = new ContactDataStore();
|
||||||
|
}
|
||||||
|
|
||||||
|
return ContactDataStore::instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ContactDataStore::clear()
|
||||||
|
{
|
||||||
|
this->data.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ContactDataStore::setData(QString key, ContactItem value)
|
||||||
|
{
|
||||||
|
this->data[key] = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
ContactItem ContactDataStore::getData(QString key)
|
||||||
|
{
|
||||||
|
return this->data[key];
|
||||||
|
}
|
||||||
|
|
||||||
|
QString ContactDataStore::dump()
|
||||||
|
{
|
||||||
|
json contacts;
|
||||||
|
contacts["count"] = this->data.size();
|
||||||
|
json j = {};
|
||||||
|
for (auto &c: this->data)
|
||||||
|
{
|
||||||
|
qDebug() << c.second.toQTString();
|
||||||
|
c.second.toJson();
|
||||||
|
j.push_back(c.second.toJson());
|
||||||
|
}
|
||||||
|
contacts["contacts"] = j;
|
||||||
|
return QString::fromStdString(contacts.dump(4));
|
||||||
|
}
|
||||||
|
|
||||||
|
ContactDataStore* ContactDataStore::instance = nullptr;
|
||||||
|
bool ContactDataStore::instanced = false;
|
||||||
34
src/DataStore/ContactDataStore.h
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
#ifndef CONTACTDATASTORE_H
|
||||||
|
#define CONTACTDATASTORE_H
|
||||||
|
#include "../Model/ContactItem.h"
|
||||||
|
#include <string>
|
||||||
|
using json = nlohmann::json;
|
||||||
|
|
||||||
|
class ContactDataStore
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
static bool instanced;
|
||||||
|
static ContactDataStore* instance;
|
||||||
|
std::map<QString, ContactItem> data;
|
||||||
|
ContactDataStore()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
static ContactDataStore* getInstance();
|
||||||
|
void clear();
|
||||||
|
void setData(QString key, ContactItem value);
|
||||||
|
ContactItem getData(QString key);
|
||||||
|
QString dump();
|
||||||
|
|
||||||
|
~ContactDataStore()
|
||||||
|
{
|
||||||
|
ContactDataStore::instanced = false;
|
||||||
|
ContactDataStore::instance = nullptr;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
58
src/DataStore/DataStore-deprecated.h
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
#ifndef DATASTORE_H
|
||||||
|
#define DATASTORE_H
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
class DataStore
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
static bool instanced;
|
||||||
|
static DataStore<T>* instance;
|
||||||
|
std::map<QString, T> data;
|
||||||
|
DataStore()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
static DataStore<T>* getInstance()
|
||||||
|
{
|
||||||
|
if(!DataStore<T>::instanced)
|
||||||
|
{
|
||||||
|
DataStore<T>::instanced = true;
|
||||||
|
DataStore<T>::instance = new DataStore<T>();
|
||||||
|
}
|
||||||
|
|
||||||
|
return DataStore<T>::instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
void clear();
|
||||||
|
void setData(QString key, T value);
|
||||||
|
QString getData(QString key);
|
||||||
|
|
||||||
|
~DataStore()
|
||||||
|
{
|
||||||
|
DataStore<T>::instanced = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
void DataStore<T>::clear()
|
||||||
|
{
|
||||||
|
this->data.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
void DataStore<T>::setData(QString key, T value)
|
||||||
|
{
|
||||||
|
this->data[key] = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
QString DataStore<T>::getData(QString key)
|
||||||
|
{
|
||||||
|
return this->data[key];
|
||||||
|
}
|
||||||
|
#endif
|
||||||
16
src/DataStore/DataStore.cpp
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#include "DataStore.h"
|
||||||
|
|
||||||
|
SietchDataStore* DataStore::getSietchDataStore()
|
||||||
|
{
|
||||||
|
return SietchDataStore::getInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
ChatDataStore* DataStore::getChatDataStore()
|
||||||
|
{
|
||||||
|
return ChatDataStore::getInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
ContactDataStore* DataStore::getContactDataStore()
|
||||||
|
{
|
||||||
|
return ContactDataStore::getInstance();
|
||||||
|
}
|
||||||
16
src/DataStore/DataStore.h
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#ifndef DATASTORE_H
|
||||||
|
#define DATASTORE_H
|
||||||
|
|
||||||
|
#include "SietchDataStore.h"
|
||||||
|
#include "ChatDataStore.h"
|
||||||
|
#include "ContactDataStore.h"
|
||||||
|
|
||||||
|
class DataStore
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static SietchDataStore* getSietchDataStore();
|
||||||
|
static ChatDataStore* getChatDataStore();
|
||||||
|
static ContactDataStore* getContactDataStore();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
35
src/DataStore/SietchDataStore.cpp
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
#include "SietchDataStore.h"
|
||||||
|
|
||||||
|
SietchDataStore* SietchDataStore::getInstance()
|
||||||
|
{
|
||||||
|
if(!SietchDataStore::instanced)
|
||||||
|
{
|
||||||
|
SietchDataStore::instanced = true;
|
||||||
|
SietchDataStore::instance = new SietchDataStore();
|
||||||
|
}
|
||||||
|
|
||||||
|
return SietchDataStore::instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SietchDataStore::clear()
|
||||||
|
{
|
||||||
|
this->data.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SietchDataStore::setData(QString key, QString value)
|
||||||
|
{
|
||||||
|
this->data[key] = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString SietchDataStore::getData(QString key)
|
||||||
|
{
|
||||||
|
return this->data[key];
|
||||||
|
}
|
||||||
|
|
||||||
|
QString SietchDataStore::dump()
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
SietchDataStore* SietchDataStore::instance = nullptr;
|
||||||
|
bool SietchDataStore::instanced = false;
|
||||||
31
src/DataStore/SietchDataStore.h
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
#ifndef SIETCHDATASTORE_H
|
||||||
|
#define SIETCHDATASTORE_H
|
||||||
|
|
||||||
|
using json = nlohmann::json;
|
||||||
|
|
||||||
|
class SietchDataStore
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
static bool instanced;
|
||||||
|
static SietchDataStore* instance;
|
||||||
|
std::map<QString, QString> data;
|
||||||
|
SietchDataStore()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
static SietchDataStore* getInstance();
|
||||||
|
void clear();
|
||||||
|
void setData(QString key, QString value);
|
||||||
|
QString getData(QString key);
|
||||||
|
QString dump();
|
||||||
|
|
||||||
|
~SietchDataStore()
|
||||||
|
{
|
||||||
|
SietchDataStore::instanced = false;
|
||||||
|
SietchDataStore::instance = nullptr;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
127
src/FileSystem/FileSystem.cpp
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
#include "FileSystem.h"
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
#include <QList>
|
||||||
|
|
||||||
|
FileSystem::FileSystem()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
FileSystem* FileSystem::getInstance()
|
||||||
|
{
|
||||||
|
if(!FileSystem::instanced)
|
||||||
|
{
|
||||||
|
FileSystem::instanced = true;
|
||||||
|
FileSystem::instance = new FileSystem();
|
||||||
|
FileEncryption::showConfig();
|
||||||
|
}
|
||||||
|
|
||||||
|
return FileSystem::instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*QList<ContactItem> FileSystem::readContacts(QString file)
|
||||||
|
{
|
||||||
|
//return this->readContactsOldFormat(file); //will be called if addresses are in the old dat-format
|
||||||
|
|
||||||
|
QFile _file(file);
|
||||||
|
if (_file.exists())
|
||||||
|
{
|
||||||
|
std::ifstream f(file.toStdString().c_str(), std::ios::binary);
|
||||||
|
if(f.is_open())
|
||||||
|
{
|
||||||
|
std::vector<unsigned char> buffer(std::istreambuf_iterator<char>(f), {});
|
||||||
|
//todo covert to string to use is as json to feed the data store in addressbook
|
||||||
|
}
|
||||||
|
|
||||||
|
f.close();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
qInfo() << file << "not exist";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileSystem::writeContacts(QString file, QString data)
|
||||||
|
{
|
||||||
|
qDebug() << data;
|
||||||
|
QFile _file(file);
|
||||||
|
if (_file.exists())
|
||||||
|
{
|
||||||
|
std::ofstream f(file.toStdString().c_str());
|
||||||
|
if(f.is_open())
|
||||||
|
{
|
||||||
|
//ENCRYPT HERE
|
||||||
|
|
||||||
|
f << data.toStdString();
|
||||||
|
}
|
||||||
|
|
||||||
|
f.close();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
qInfo() << file << "not exist";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileSystem::writeContactsOldFormat(QString file, QList<ContactItem> contacts)
|
||||||
|
{
|
||||||
|
QFile _file(file);
|
||||||
|
_file.open(QIODevice::ReadWrite | QIODevice::Truncate);
|
||||||
|
QDataStream out(&_file); // we will serialize the data into the file
|
||||||
|
QList<QList<QString>> _contacts;
|
||||||
|
for(auto &item: contacts)
|
||||||
|
{
|
||||||
|
QList<QString> c;
|
||||||
|
c.push_back(item.getName());
|
||||||
|
c.push_back(item.getPartnerAddress());
|
||||||
|
c.push_back(item.getMyAddress());
|
||||||
|
c.push_back(item.getCid());
|
||||||
|
c.push_back(item.getAvatar());
|
||||||
|
_contacts.push_back(c);
|
||||||
|
}
|
||||||
|
out << QString("v0") << _contacts;
|
||||||
|
_file.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
QList<ContactItem> FileSystem::readContactsOldFormat(QString file)
|
||||||
|
{
|
||||||
|
QList<ContactItem> contacts;
|
||||||
|
QFile _file(file);
|
||||||
|
if (_file.exists())
|
||||||
|
{
|
||||||
|
contacts.clear();
|
||||||
|
_file.open(QIODevice::ReadOnly);
|
||||||
|
QDataStream in(&_file); // read the data serialized from the file
|
||||||
|
QString version;
|
||||||
|
in >> version;
|
||||||
|
qDebug() << "Read " << version << " Hush contacts from disk...";
|
||||||
|
qDebug() << "Detected old addressbook format";
|
||||||
|
QList<QList<QString>> stuff;
|
||||||
|
in >> stuff;
|
||||||
|
//qDebug() << "Stuff: " << stuff;
|
||||||
|
for (int i=0; i < stuff.size(); i++)
|
||||||
|
{
|
||||||
|
ContactItem contact = ContactItem(stuff[i][0],stuff[i][1], stuff[i][2], stuff[i][3],stuff[i][4]);
|
||||||
|
contacts.push_back(contact);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
_file.close();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
qDebug() << "No Hush contacts found on disk!";
|
||||||
|
}
|
||||||
|
|
||||||
|
return contacts;
|
||||||
|
}
|
||||||
|
|
||||||
|
FileSystem::~FileSystem()
|
||||||
|
{
|
||||||
|
this->instance = nullptr;
|
||||||
|
this->instanced = false;
|
||||||
|
delete this->instance;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
FileSystem *FileSystem::instance = nullptr;
|
||||||
|
bool FileSystem::instanced = false;
|
||||||