diff --git a/app/build.gradle b/app/build.gradle index 43cc941..2c19038 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -38,14 +38,11 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') + implementation fileTree(include: ['*.jar'], dir: 'libs/tomp2p') implementation 'androidx.appcompat:appcompat:1.1.0-alpha02' implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3' implementation "androidx.room:room-runtime:2.1.0-alpha04" annotationProcessor "androidx.room:room-compiler:2.1.0-alpha04" - implementation('net.tomp2p:tomp2p-all:5.0-Beta8') { - exclude group: 'net.tomp2p', module: 'tomp2p-storage' - exclude group: 'org.mapdb', module: 'mapdb' - } implementation 'org.slf4j:slf4j-log4j12:1.7.26' implementation group: 'com.h2database', name: 'h2-mvstore', version: '1.4.197' implementation 'com.google.android.material:material:1.1.0-alpha04' diff --git a/app/libs/org.mapdb.mapdb.main.jar b/app/libs/org.mapdb.mapdb.main.jar deleted file mode 100644 index 2391adb..0000000 Binary files a/app/libs/org.mapdb.mapdb.main.jar and /dev/null differ diff --git a/app/libs/tomp2p-all-5.0-Beta8.jar b/app/libs/tomp2p-all-5.0-Beta8.jar new file mode 100644 index 0000000..f9b158d Binary files /dev/null and b/app/libs/tomp2p-all-5.0-Beta8.jar differ diff --git a/app/libs/tomp2p/gcm-server-1.0.2.jar b/app/libs/tomp2p/gcm-server-1.0.2.jar new file mode 100644 index 0000000..0554b24 Binary files /dev/null and b/app/libs/tomp2p/gcm-server-1.0.2.jar differ diff --git a/app/libs/tomp2p/json-simple-1.1.jar b/app/libs/tomp2p/json-simple-1.1.jar new file mode 100644 index 0000000..f395f41 Binary files /dev/null and b/app/libs/tomp2p/json-simple-1.1.jar differ diff --git a/app/libs/tomp2p/netty-buffer-4.0.28.Final.jar b/app/libs/tomp2p/netty-buffer-4.0.28.Final.jar new file mode 100644 index 0000000..89265f4 Binary files /dev/null and b/app/libs/tomp2p/netty-buffer-4.0.28.Final.jar differ diff --git a/app/libs/tomp2p/netty-common-4.0.28.Final.jar b/app/libs/tomp2p/netty-common-4.0.28.Final.jar new file mode 100644 index 0000000..a86716e Binary files /dev/null and b/app/libs/tomp2p/netty-common-4.0.28.Final.jar differ diff --git a/app/libs/tomp2p/netty-transport-4.0.28.Final.jar b/app/libs/tomp2p/netty-transport-4.0.28.Final.jar new file mode 100644 index 0000000..50a9e5f Binary files /dev/null and b/app/libs/tomp2p/netty-transport-4.0.28.Final.jar differ diff --git a/app/libs/tomp2p/slf4j-api-1.7.5.jar b/app/libs/tomp2p/slf4j-api-1.7.5.jar new file mode 100644 index 0000000..8f004d3 Binary files /dev/null and b/app/libs/tomp2p/slf4j-api-1.7.5.jar differ diff --git a/app/libs/tomp2p/tomp2p-all-5.0-Beta8.jar b/app/libs/tomp2p/tomp2p-all-5.0-Beta8.jar new file mode 100644 index 0000000..f9b158d Binary files /dev/null and b/app/libs/tomp2p/tomp2p-all-5.0-Beta8.jar differ diff --git a/app/libs/tomp2p/tomp2p-android-5.0-Beta8.jar b/app/libs/tomp2p/tomp2p-android-5.0-Beta8.jar new file mode 100644 index 0000000..3851393 Binary files /dev/null and b/app/libs/tomp2p/tomp2p-android-5.0-Beta8.jar differ diff --git a/app/libs/tomp2p/tomp2p-core-5.0-Beta8.jar b/app/libs/tomp2p/tomp2p-core-5.0-Beta8.jar new file mode 100644 index 0000000..83e3296 Binary files /dev/null and b/app/libs/tomp2p/tomp2p-core-5.0-Beta8.jar differ diff --git a/app/libs/tomp2p/tomp2p-dht-5.0-Beta8.jar b/app/libs/tomp2p/tomp2p-dht-5.0-Beta8.jar new file mode 100644 index 0000000..2649756 Binary files /dev/null and b/app/libs/tomp2p/tomp2p-dht-5.0-Beta8.jar differ diff --git a/app/libs/tomp2p/tomp2p-nat-5.0-Beta8.jar b/app/libs/tomp2p/tomp2p-nat-5.0-Beta8.jar new file mode 100644 index 0000000..e424314 Binary files /dev/null and b/app/libs/tomp2p/tomp2p-nat-5.0-Beta8.jar differ diff --git a/app/libs/tomp2p/tomp2p-replication-5.0-Beta8.jar b/app/libs/tomp2p/tomp2p-replication-5.0-Beta8.jar new file mode 100644 index 0000000..0998fe2 Binary files /dev/null and b/app/libs/tomp2p/tomp2p-replication-5.0-Beta8.jar differ diff --git a/app/libs/tomp2p/tomp2p-tracker-5.0-Beta8.jar b/app/libs/tomp2p/tomp2p-tracker-5.0-Beta8.jar new file mode 100644 index 0000000..50a792b Binary files /dev/null and b/app/libs/tomp2p/tomp2p-tracker-5.0-Beta8.jar differ diff --git a/app/libs/tomp2p/weupnp-0.1.2.jar b/app/libs/tomp2p/weupnp-0.1.2.jar new file mode 100644 index 0000000..43daf9f Binary files /dev/null and b/app/libs/tomp2p/weupnp-0.1.2.jar differ diff --git a/app/src/main/java/io/github/chronosx88/influence/helpers/DataSerializerEx.kt b/app/src/main/java/io/github/chronosx88/influence/helpers/DataSerializerEx.kt index d0d06f9..fcacbef 100644 --- a/app/src/main/java/io/github/chronosx88/influence/helpers/DataSerializerEx.kt +++ b/app/src/main/java/io/github/chronosx88/influence/helpers/DataSerializerEx.kt @@ -47,16 +47,10 @@ class DataSerializerEx(private val signatureFactory: SignatureFactory) : EntryBi if (!retVal) { Log.e(LOG_TAG, "# ERROR: Data could not be deserialized!") } - retVal = data.decodeDone(buf, signatureFactory) - if (!retVal) { - Log.e(LOG_TAG, "# ERROR: Signature could not be read!") - } return data } override fun objectToEntry(data: Data, databaseEntry: DatabaseEntry) { - val forSigningKP = keyPairManager.getKeyPair("mainSigningKeyPair") - data.sign(forSigningKP) val out = ByteArrayOutputStream() val acb = AlternativeCompositeByteBuf.compBuffer(AlternativeCompositeByteBuf.UNPOOLED_HEAP) try { @@ -68,8 +62,8 @@ class DataSerializerEx(private val signatureFactory: SignatureFactory) : EntryBi // from memory writeData(out, data.toByteBuffers()) // rest - data.encodeDone(acb, signatureFactory) - writeData(out, acb.nioBuffers()) + // data.encodeDone(acb, signatureFactory) + // writeData(out, acb.nioBuffers()) } catch (e: SignatureException) { e.printStackTrace() } catch (e: InvalidKeyException) { @@ -98,7 +92,6 @@ class DataSerializerEx(private val signatureFactory: SignatureFactory) : EntryBi companion object { private const val serialVersionUID = 1428836065493792295L - private val keyPairManager = KeyPairManager() } }