mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-23 18:15:22 +00:00
WIP clean
This commit is contained in:
parent
106bd4b560
commit
9856814904
@ -8,17 +8,11 @@ import com.goterl.lazycode.lazysodium.interfaces.Box
|
||||
import com.goterl.lazycode.lazysodium.interfaces.Sign
|
||||
import org.session.libsignal.libsignal.ecc.ECKeyPair
|
||||
import org.session.libsignal.libsignal.util.Hex
|
||||
import org.session.libsignal.service.api.messages.SignalServiceEnvelope
|
||||
import org.session.libsignal.service.internal.push.SignalServiceProtos.Envelope.Type.CLOSED_GROUP_CIPHERTEXT_VALUE
|
||||
import org.session.libsignal.service.internal.push.SignalServiceProtos.Envelope.Type.UNIDENTIFIED_SENDER_VALUE
|
||||
import org.session.libsignal.service.loki.api.crypto.SessionProtocol
|
||||
import org.session.libsignal.service.loki.utilities.hexEncodedPublicKey
|
||||
import org.session.libsignal.service.loki.utilities.removing05PrefixIfNeeded
|
||||
import org.session.libsignal.service.loki.utilities.toHexString
|
||||
import org.thoughtcrime.securesms.crypto.IdentityKeyUtil
|
||||
import org.thoughtcrime.securesms.database.DatabaseFactory
|
||||
import org.thoughtcrime.securesms.loki.utilities.KeyPairUtilities
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences
|
||||
|
||||
class SessionProtocolImpl(private val context: Context) : SessionProtocol {
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -11,27 +11,21 @@ import org.session.libsignal.service.loki.protocol.closedgroups.SharedSenderKeys
|
||||
class MessagingConfiguration(
|
||||
val context: Context,
|
||||
val storage: StorageProtocol,
|
||||
val signalStorage: SignalProtocolStore,
|
||||
val sskDatabase: SharedSenderKeysDatabaseProtocol,
|
||||
val messageDataProvider: MessageDataProvider,
|
||||
val sessionResetImp: SessionResetProtocol,
|
||||
val sessionProtocol: SessionProtocol,
|
||||
val certificateValidator: CertificateValidator)
|
||||
val sessionProtocol: SessionProtocol)
|
||||
{
|
||||
companion object {
|
||||
lateinit var shared: MessagingConfiguration
|
||||
|
||||
fun configure(context: Context,
|
||||
storage: StorageProtocol,
|
||||
signalStorage: SignalProtocolStore,
|
||||
sskDatabase: SharedSenderKeysDatabaseProtocol,
|
||||
messageDataProvider: MessageDataProvider,
|
||||
sessionResetImp: SessionResetProtocol,
|
||||
sessionProtocol: SessionProtocol,
|
||||
certificateValidator: CertificateValidator
|
||||
sessionProtocol: SessionProtocol
|
||||
) {
|
||||
if (Companion::shared.isInitialized) { return }
|
||||
shared = MessagingConfiguration(context, storage, signalStorage, sskDatabase, messageDataProvider, sessionResetImp, sessionProtocol, certificateValidator)
|
||||
shared = MessagingConfiguration(context, storage, sskDatabase, messageDataProvider, sessionProtocol)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user