diff --git a/app/src/main/java/org/thoughtcrime/securesms/attachments/AttachmentServer.java b/app/src/main/java/org/thoughtcrime/securesms/attachments/AttachmentServer.java index 44f5dd4152..68c69ed401 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/attachments/AttachmentServer.java +++ b/app/src/main/java/org/thoughtcrime/securesms/attachments/AttachmentServer.java @@ -8,7 +8,7 @@ import androidx.annotation.NonNull; import org.thoughtcrime.securesms.logging.Log; import org.thoughtcrime.securesms.mms.PartAuthority; -import org.session.libsession.utilities.Hex; +import org.session.libsignal.utilities.Hex; import org.session.libsession.utilities.Util; import org.session.libsession.messaging.sending_receiving.attachments.Attachment; diff --git a/app/src/main/java/org/thoughtcrime/securesms/crypto/DatabaseSecret.java b/app/src/main/java/org/thoughtcrime/securesms/crypto/DatabaseSecret.java index d406211aff..7429ce7221 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/crypto/DatabaseSecret.java +++ b/app/src/main/java/org/thoughtcrime/securesms/crypto/DatabaseSecret.java @@ -3,7 +3,7 @@ package org.thoughtcrime.securesms.crypto; import androidx.annotation.NonNull; -import org.session.libsession.utilities.Hex; +import org.session.libsignal.utilities.Hex; import java.io.IOException; diff --git a/app/src/main/java/org/thoughtcrime/securesms/crypto/MasterCipher.java b/app/src/main/java/org/thoughtcrime/securesms/crypto/MasterCipher.java index 255acbdb44..a7299a1853 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/crypto/MasterCipher.java +++ b/app/src/main/java/org/thoughtcrime/securesms/crypto/MasterCipher.java @@ -25,7 +25,7 @@ import org.session.libsignal.libsignal.ecc.ECPrivateKey; import org.thoughtcrime.securesms.logging.Log; import org.session.libsession.utilities.Base64; -import org.session.libsession.utilities.Hex; +import org.session.libsignal.utilities.Hex; import java.io.IOException; import java.security.GeneralSecurityException; diff --git a/app/src/main/java/org/thoughtcrime/securesms/crypto/PublicKey.java b/app/src/main/java/org/thoughtcrime/securesms/crypto/PublicKey.java index 6a0d0e0d95..8bf86d997e 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/crypto/PublicKey.java +++ b/app/src/main/java/org/thoughtcrime/securesms/crypto/PublicKey.java @@ -18,7 +18,7 @@ package org.thoughtcrime.securesms.crypto; import org.thoughtcrime.securesms.logging.Log; -import org.session.libsession.utilities.Hex; +import org.session.libsignal.utilities.Hex; import org.session.libsession.utilities.Util; import org.session.libsignal.libsignal.InvalidKeyException; import org.session.libsignal.libsignal.ecc.Curve; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/AttachmentDownloadJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/AttachmentDownloadJob.java index dda32ad82c..9f39f5b00e 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/AttachmentDownloadJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/AttachmentDownloadJob.java @@ -28,7 +28,7 @@ import org.thoughtcrime.securesms.logging.Log; import org.thoughtcrime.securesms.mms.MmsException; import org.thoughtcrime.securesms.util.AttachmentUtil; import org.session.libsession.utilities.Base64; -import org.session.libsession.utilities.Hex; +import org.session.libsignal.utilities.Hex; import org.session.libsession.utilities.Util; import java.io.File; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/AvatarDownloadJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/AvatarDownloadJob.java index 5ef7ec7af9..1cff5dcf36 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/AvatarDownloadJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/AvatarDownloadJob.java @@ -14,7 +14,7 @@ import org.thoughtcrime.securesms.logging.Log; import org.thoughtcrime.securesms.mms.AttachmentStreamUriLoader.AttachmentModel; import org.thoughtcrime.securesms.util.BitmapDecodingException; import org.thoughtcrime.securesms.util.BitmapUtil; -import org.session.libsession.utilities.Hex; +import org.session.libsignal.utilities.Hex; import org.session.libsignal.libsignal.InvalidMessageException; import org.session.libsignal.libsignal.util.guava.Optional; import org.session.libsignal.service.api.SignalServiceMessageReceiver; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/MmsSendJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/MmsSendJob.java index bcf8906914..507b886080 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/MmsSendJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/MmsSendJob.java @@ -39,7 +39,7 @@ import org.thoughtcrime.securesms.mms.PartAuthority; import org.session.libsession.messaging.threads.recipients.Recipient; import org.thoughtcrime.securesms.transport.InsecureFallbackApprovalException; import org.thoughtcrime.securesms.transport.UndeliverableMessageException; -import org.session.libsession.utilities.Hex; +import org.session.libsignal.utilities.Hex; import org.session.libsession.utilities.NumberUtil; import org.session.libsession.utilities.TextSecurePreferences; import org.session.libsession.utilities.Util; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/PushDecryptJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/PushDecryptJob.java index 1eb655472d..caec924e70 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/PushDecryptJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/PushDecryptJob.java @@ -97,7 +97,7 @@ import org.thoughtcrime.securesms.sms.IncomingTextMessage; import org.thoughtcrime.securesms.sms.OutgoingEncryptedMessage; import org.thoughtcrime.securesms.sms.OutgoingEndSessionMessage; import org.thoughtcrime.securesms.sms.OutgoingTextMessage; -import org.session.libsession.utilities.Hex; +import org.session.libsignal.utilities.Hex; import org.thoughtcrime.securesms.util.MediaUtil; import org.session.libsignal.libsignal.InvalidMessageException; import org.session.libsignal.libsignal.loki.SessionResetProtocol; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/PushSendJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/PushSendJob.java index 142b6f7587..7594ee3729 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/PushSendJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/PushSendJob.java @@ -30,7 +30,7 @@ import org.thoughtcrime.securesms.mms.PartAuthority; import org.session.libsession.messaging.threads.recipients.Recipient; import org.thoughtcrime.securesms.util.BitmapDecodingException; import org.thoughtcrime.securesms.util.BitmapUtil; -import org.session.libsession.utilities.Hex; +import org.session.libsignal.utilities.Hex; import org.thoughtcrime.securesms.util.MediaUtil; import org.session.libsignal.libsignal.util.guava.Optional; import org.session.libsignal.service.api.crypto.UnidentifiedAccessPair; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/StickerDownloadJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/StickerDownloadJob.java index fc6372abb1..a5e3b408c6 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/StickerDownloadJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/StickerDownloadJob.java @@ -10,7 +10,7 @@ import org.thoughtcrime.securesms.dependencies.InjectableType; import org.thoughtcrime.securesms.jobmanager.Job; import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraint; import org.thoughtcrime.securesms.logging.Log; -import org.session.libsession.utilities.Hex; +import org.session.libsignal.utilities.Hex; import org.session.libsignal.service.api.SignalServiceMessageReceiver; import org.session.libsignal.service.api.push.exceptions.PushNetworkException; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/StickerPackDownloadJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/StickerPackDownloadJob.java index a486d5b8bc..f7de43232d 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/StickerPackDownloadJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/StickerPackDownloadJob.java @@ -12,7 +12,7 @@ import org.thoughtcrime.securesms.jobmanager.Job; import org.thoughtcrime.securesms.jobmanager.JobManager; import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraint; import org.thoughtcrime.securesms.logging.Log; -import org.session.libsession.utilities.Hex; +import org.session.libsignal.utilities.Hex; import org.session.libsignal.libsignal.InvalidMessageException; import org.session.libsignal.service.api.SignalServiceMessageReceiver; import org.session.libsignal.service.api.messages.SignalServiceStickerManifest; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/UpdateApkJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/UpdateApkJob.java index 26c30124fa..5e6adb0e2f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/UpdateApkJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/UpdateApkJob.java @@ -19,7 +19,7 @@ import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraint; import org.thoughtcrime.securesms.logging.Log; import org.thoughtcrime.securesms.service.UpdateApkReadyListener; import org.thoughtcrime.securesms.util.FileUtils; -import org.session.libsession.utilities.Hex; +import org.session.libsignal.utilities.Hex; import org.session.libsession.utilities.JsonUtils; import org.session.libsession.utilities.TextSecurePreferences; diff --git a/app/src/main/java/org/thoughtcrime/securesms/linkpreview/LinkPreviewRepository.java b/app/src/main/java/org/thoughtcrime/securesms/linkpreview/LinkPreviewRepository.java index 90df94adb4..006a79a412 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/linkpreview/LinkPreviewRepository.java +++ b/app/src/main/java/org/thoughtcrime/securesms/linkpreview/LinkPreviewRepository.java @@ -23,7 +23,7 @@ import org.thoughtcrime.securesms.net.RequestController; import org.thoughtcrime.securesms.providers.BlobProvider; import org.thoughtcrime.securesms.stickers.StickerRemoteUri; import org.thoughtcrime.securesms.stickers.StickerUrl; -import org.session.libsession.utilities.Hex; +import org.session.libsignal.utilities.Hex; import org.thoughtcrime.securesms.util.MediaUtil; import org.session.libsignal.libsignal.InvalidMessageException; import org.session.libsignal.libsignal.util.Pair; diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/RecoveryPhraseRestoreActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/RecoveryPhraseRestoreActivity.kt index 52c42cfbba..2ad52d19da 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/RecoveryPhraseRestoreActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/RecoveryPhraseRestoreActivity.kt @@ -18,7 +18,7 @@ import org.thoughtcrime.securesms.loki.utilities.KeyPairUtilities import org.thoughtcrime.securesms.loki.utilities.MnemonicUtilities import org.thoughtcrime.securesms.loki.utilities.push import org.thoughtcrime.securesms.loki.utilities.setUpActionBarSessionLogo -import org.session.libsession.utilities.Hex +import org.session.libsignal.utilities.Hex import org.session.libsession.utilities.TextSecurePreferences import org.session.libsignal.libsignal.util.KeyHelper import org.session.libsignal.service.loki.crypto.MnemonicCodec diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/api/SessionProtocolImpl.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/api/SessionProtocolImpl.kt index d817960a30..8a8c18565d 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/api/SessionProtocolImpl.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/api/SessionProtocolImpl.kt @@ -7,7 +7,7 @@ import com.goterl.lazycode.lazysodium.SodiumAndroid import com.goterl.lazycode.lazysodium.interfaces.Box import com.goterl.lazycode.lazysodium.interfaces.Sign -import org.session.libsession.utilities.Hex +import org.session.libsignal.utilities.Hex import org.session.libsignal.libsignal.ecc.ECKeyPair import org.session.libsignal.service.loki.api.crypto.SessionProtocol diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/database/LokiAPIDatabase.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/database/LokiAPIDatabase.kt index 6a5e7ea447..3f850737f2 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/database/LokiAPIDatabase.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/database/LokiAPIDatabase.kt @@ -15,7 +15,7 @@ import org.session.libsignal.service.loki.protocol.shelved.multidevice.DeviceLin import org.session.libsignal.service.loki.utilities.removing05PrefixIfNeeded import org.session.libsignal.service.loki.utilities.toHexString import org.thoughtcrime.securesms.crypto.IdentityKeyUtil -import org.session.libsession.utilities.Hex +import org.session.libsignal.utilities.Hex import org.session.libsession.utilities.TextSecurePreferences import java.util.* diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/database/SharedSenderKeysDatabase.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/database/SharedSenderKeysDatabase.kt index 271ae1a724..c8907dbdbe 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/database/SharedSenderKeysDatabase.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/database/SharedSenderKeysDatabase.kt @@ -5,7 +5,7 @@ import android.content.Context import org.thoughtcrime.securesms.database.Database import org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper import org.thoughtcrime.securesms.loki.utilities.* -import org.session.libsession.utilities.Hex +import org.session.libsignal.utilities.Hex import org.session.libsignal.service.loki.protocol.closedgroups.ClosedGroupRatchet import org.session.libsignal.service.loki.protocol.closedgroups.ClosedGroupRatchetCollectionType import org.session.libsignal.service.loki.protocol.closedgroups.ClosedGroupSenderKey diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupUpdateMessageSendJob.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupUpdateMessageSendJob.kt index 25a5887973..a492248b6a 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupUpdateMessageSendJob.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupUpdateMessageSendJob.kt @@ -9,7 +9,7 @@ import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraint import org.thoughtcrime.securesms.jobs.BaseJob import org.thoughtcrime.securesms.logging.Log import org.thoughtcrime.securesms.loki.utilities.recipient -import org.session.libsession.utilities.Hex +import org.session.libsignal.utilities.Hex import org.session.libsignal.service.api.push.SignalServiceAddress import org.session.libsignal.service.internal.push.SignalServiceProtos import org.session.libsignal.service.loki.protocol.closedgroups.ClosedGroupSenderKey diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupUpdateMessageSendJobV2.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupUpdateMessageSendJobV2.kt index 06c818910d..f840cb861b 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupUpdateMessageSendJobV2.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupUpdateMessageSendJobV2.kt @@ -21,7 +21,7 @@ import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraint import org.thoughtcrime.securesms.jobs.BaseJob import org.thoughtcrime.securesms.logging.Log import org.thoughtcrime.securesms.loki.utilities.recipient -import org.session.libsession.utilities.Hex +import org.session.libsignal.utilities.Hex import java.util.* import java.util.concurrent.TimeUnit diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupsMigration.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupsMigration.kt index 3ca7bc7188..dd104d510a 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupsMigration.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupsMigration.kt @@ -7,7 +7,7 @@ import org.thoughtcrime.securesms.loki.utilities.get import org.thoughtcrime.securesms.loki.utilities.getAll import org.thoughtcrime.securesms.loki.utilities.getString import org.thoughtcrime.securesms.loki.utilities.insertOrUpdate -import org.session.libsession.utilities.Hex +import org.session.libsignal.utilities.Hex import org.session.libsignal.libsignal.ecc.DjbECPrivateKey import org.session.libsignal.libsignal.ecc.DjbECPublicKey import org.session.libsignal.libsignal.ecc.ECKeyPair diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupsProtocol.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupsProtocol.kt index c2d03c5f82..a854eb6f9a 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupsProtocol.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupsProtocol.kt @@ -22,7 +22,7 @@ import org.thoughtcrime.securesms.loki.api.LokiPushNotificationManager.ClosedGro import org.thoughtcrime.securesms.loki.utilities.recipient import org.thoughtcrime.securesms.mms.OutgoingGroupMediaMessage import org.thoughtcrime.securesms.sms.MessageSender -import org.session.libsession.utilities.Hex +import org.session.libsignal.utilities.Hex import java.io.IOException import java.util.* diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupsProtocolV2.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupsProtocolV2.kt index 57e8515a0c..7c76829a58 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupsProtocolV2.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupsProtocolV2.kt @@ -24,7 +24,7 @@ import org.thoughtcrime.securesms.loki.api.SessionProtocolImpl import org.thoughtcrime.securesms.mms.OutgoingGroupMediaMessage import org.thoughtcrime.securesms.sms.IncomingGroupMessage import org.thoughtcrime.securesms.sms.IncomingTextMessage -import org.session.libsession.utilities.Hex +import org.session.libsignal.utilities.Hex import org.session.libsession.messaging.threads.Address import org.session.libsession.messaging.threads.recipients.Recipient diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/utilities/KeyPairUtilities.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/utilities/KeyPairUtilities.kt index 3c2992d9af..542e631f28 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/utilities/KeyPairUtilities.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/utilities/KeyPairUtilities.kt @@ -7,7 +7,7 @@ import com.goterl.lazycode.lazysodium.utils.Key import com.goterl.lazycode.lazysodium.utils.KeyPair import org.thoughtcrime.securesms.crypto.IdentityKeyUtil import org.session.libsession.utilities.Base64 -import org.session.libsession.utilities.Hex +import org.session.libsignal.utilities.Hex import org.session.libsignal.libsignal.ecc.DjbECPrivateKey import org.session.libsignal.libsignal.ecc.DjbECPublicKey import org.session.libsignal.libsignal.ecc.ECKeyPair diff --git a/app/src/main/java/org/thoughtcrime/securesms/service/UpdateApkReadyListener.java b/app/src/main/java/org/thoughtcrime/securesms/service/UpdateApkReadyListener.java index 0adcfd6834..6207b873b8 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/service/UpdateApkReadyListener.java +++ b/app/src/main/java/org/thoughtcrime/securesms/service/UpdateApkReadyListener.java @@ -18,7 +18,7 @@ import network.loki.messenger.R; import org.thoughtcrime.securesms.notifications.NotificationChannels; import org.thoughtcrime.securesms.util.FileProviderUtil; import org.thoughtcrime.securesms.util.FileUtils; -import org.session.libsession.utilities.Hex; +import org.session.libsignal.utilities.Hex; import org.session.libsession.utilities.ServiceUtil; import org.session.libsession.utilities.TextSecurePreferences; diff --git a/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerPackPreviewRepository.java b/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerPackPreviewRepository.java index f1ba56b2de..67e4a47203 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerPackPreviewRepository.java +++ b/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerPackPreviewRepository.java @@ -14,7 +14,7 @@ import org.thoughtcrime.securesms.database.model.StickerPackRecord; import org.thoughtcrime.securesms.database.model.StickerRecord; import org.thoughtcrime.securesms.dependencies.InjectableType; import org.thoughtcrime.securesms.logging.Log; -import org.session.libsession.utilities.Hex; +import org.session.libsignal.utilities.Hex; import org.session.libsession.utilities.concurrent.SignalExecutors; import org.session.libsignal.libsignal.InvalidMessageException; import org.session.libsignal.libsignal.util.guava.Optional; diff --git a/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerRemoteUriFetcher.java b/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerRemoteUriFetcher.java index e54af7e967..424ebbbedb 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerRemoteUriFetcher.java +++ b/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerRemoteUriFetcher.java @@ -7,7 +7,7 @@ import com.bumptech.glide.load.DataSource; import com.bumptech.glide.load.data.DataFetcher; import org.thoughtcrime.securesms.logging.Log; -import org.session.libsession.utilities.Hex; +import org.session.libsignal.utilities.Hex; import org.session.libsignal.libsignal.InvalidMessageException; import org.session.libsignal.service.api.SignalServiceMessageReceiver; diff --git a/libsession/src/main/java/org/session/libsession/messaging/opengroups/OpenGroupAPI.kt b/libsession/src/main/java/org/session/libsession/messaging/opengroups/OpenGroupAPI.kt index 9d0d03750c..6783fba6b6 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/opengroups/OpenGroupAPI.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/opengroups/OpenGroupAPI.kt @@ -14,10 +14,8 @@ import org.session.libsession.utilities.createContext import org.session.libsignal.libsignal.logging.Log import org.session.libsignal.service.internal.util.Base64 -import org.session.libsignal.service.internal.util.Hex +import org.session.libsignal.utilities.Hex import org.session.libsignal.service.internal.util.JsonUtil -import org.session.libsignal.service.loki.api.LokiDotNetAPI -import org.session.libsignal.service.loki.api.opengroups.PublicChatAPI import org.session.libsignal.service.loki.utilities.DownloadUtilities import org.session.libsignal.service.loki.utilities.retryIfNeeded import java.io.ByteArrayOutputStream diff --git a/libsession/src/main/java/org/session/libsession/messaging/opengroups/OpenGroupMessage.kt b/libsession/src/main/java/org/session/libsession/messaging/opengroups/OpenGroupMessage.kt index 64e437ecd5..f7c0817ed8 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/opengroups/OpenGroupMessage.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/opengroups/OpenGroupMessage.kt @@ -3,7 +3,7 @@ package org.session.libsession.messaging.opengroups import org.session.libsession.messaging.MessagingConfiguration import org.session.libsession.messaging.messages.visible.VisibleMessage import org.session.libsignal.libsignal.logging.Log -import org.session.libsignal.service.internal.util.Hex +import org.session.libsignal.utilities.Hex import org.session.libsignal.service.loki.utilities.removing05PrefixIfNeeded import org.whispersystems.curve25519.Curve25519 diff --git a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/MessageReceiverHandler.kt b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/MessageReceiverHandler.kt index ab19ec0a48..e92082897f 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/MessageReceiverHandler.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/MessageReceiverHandler.kt @@ -19,7 +19,7 @@ import org.session.libsession.messaging.sending_receiving.quotes.QuoteModel import org.session.libsession.messaging.threads.Address import org.session.libsession.messaging.threads.recipients.Recipient import org.session.libsession.utilities.GroupUtil -import org.session.libsession.utilities.Hex +import org.session.libsignal.utilities.Hex import org.session.libsession.utilities.SSKEnvironment import org.session.libsession.utilities.TextSecurePreferences import org.session.libsignal.libsignal.logging.Log diff --git a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/MessageSenderClosedGroup.kt b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/MessageSenderClosedGroup.kt index 23e0d2761f..807d693fae 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/MessageSenderClosedGroup.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/MessageSenderClosedGroup.kt @@ -12,7 +12,7 @@ import org.session.libsession.messaging.sending_receiving.notifications.PushNoti import org.session.libsession.messaging.sending_receiving.MessageSender.Error import org.session.libsession.messaging.threads.Address import org.session.libsession.utilities.GroupUtil -import org.session.libsession.utilities.Hex +import org.session.libsignal.utilities.Hex import org.session.libsignal.libsignal.ecc.Curve import org.session.libsignal.service.internal.push.SignalServiceProtos diff --git a/libsession/src/main/java/org/session/libsession/messaging/utilities/DotNetAPI.kt b/libsession/src/main/java/org/session/libsession/messaging/utilities/DotNetAPI.kt index de791f99b2..df3e840047 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/utilities/DotNetAPI.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/utilities/DotNetAPI.kt @@ -10,8 +10,6 @@ import org.session.libsession.messaging.MessagingConfiguration import org.session.libsession.snode.OnionRequestAPI import org.session.libsession.snode.SnodeAPI import org.session.libsession.messaging.fileserver.FileServerAPI -import org.session.libsession.messaging.sending_receiving.MessageReceiver -import org.session.libsession.messaging.sending_receiving.attachments.SessionServiceAttachment import org.session.libsignal.libsignal.logging.Log import org.session.libsignal.libsignal.loki.DiffieHellman @@ -25,7 +23,7 @@ import org.session.libsignal.service.internal.push.PushAttachmentData import org.session.libsignal.service.internal.push.http.DigestingRequestBody import org.session.libsignal.service.internal.push.http.ProfileCipherOutputStreamFactory import org.session.libsignal.service.internal.util.Base64 -import org.session.libsignal.service.internal.util.Hex +import org.session.libsignal.utilities.Hex import org.session.libsignal.service.internal.util.JsonUtil import org.session.libsignal.service.loki.api.utilities.HTTP import org.session.libsignal.service.loki.utilities.* diff --git a/libsession/src/main/java/org/session/libsession/utilities/AESGCM.kt b/libsession/src/main/java/org/session/libsession/utilities/AESGCM.kt index 666ee50591..fcbbf548d8 100644 --- a/libsession/src/main/java/org/session/libsession/utilities/AESGCM.kt +++ b/libsession/src/main/java/org/session/libsession/utilities/AESGCM.kt @@ -3,6 +3,7 @@ package org.session.libsession.utilities import org.whispersystems.curve25519.Curve25519 import org.session.libsignal.libsignal.util.ByteUtil import org.session.libsignal.service.internal.util.Util +import org.session.libsignal.utilities.Hex import javax.crypto.Cipher import javax.crypto.Mac import javax.crypto.spec.GCMParameterSpec diff --git a/libsession/src/main/java/org/session/libsession/utilities/GroupUtil.kt b/libsession/src/main/java/org/session/libsession/utilities/GroupUtil.kt index 9e58fd1f33..24fcb44862 100644 --- a/libsession/src/main/java/org/session/libsession/utilities/GroupUtil.kt +++ b/libsession/src/main/java/org/session/libsession/utilities/GroupUtil.kt @@ -1,6 +1,7 @@ package org.session.libsession.utilities import org.session.libsignal.service.api.messages.SignalServiceGroup +import org.session.libsignal.utilities.Hex object GroupUtil { const val CLOSED_GROUP_PREFIX = "__textsecure_group__!" diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/IdentityKey.java b/libsignal/src/main/java/org/session/libsignal/libsignal/IdentityKey.java index 28aa576403..7350ceb329 100644 --- a/libsignal/src/main/java/org/session/libsignal/libsignal/IdentityKey.java +++ b/libsignal/src/main/java/org/session/libsignal/libsignal/IdentityKey.java @@ -6,10 +6,9 @@ package org.session.libsignal.libsignal; -import org.session.libsignal.libsignal.InvalidKeyException; import org.session.libsignal.libsignal.ecc.Curve; import org.session.libsignal.libsignal.ecc.ECPublicKey; -import org.session.libsignal.libsignal.util.Hex; +import org.session.libsignal.utilities.Hex; /** * A class for representing an identity key. diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/loki/FallbackSessionCipher.kt b/libsignal/src/main/java/org/session/libsignal/libsignal/loki/FallbackSessionCipher.kt index f6833f5779..02c4012e74 100644 --- a/libsignal/src/main/java/org/session/libsignal/libsignal/loki/FallbackSessionCipher.kt +++ b/libsignal/src/main/java/org/session/libsignal/libsignal/loki/FallbackSessionCipher.kt @@ -1,7 +1,7 @@ package org.session.libsignal.libsignal.loki import org.whispersystems.curve25519.Curve25519 -import org.session.libsignal.libsignal.util.Hex +import org.session.libsignal.utilities.Hex import org.session.libsignal.service.loki.utilities.removing05PrefixIfNeeded /** diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/util/ByteUtil.java b/libsignal/src/main/java/org/session/libsignal/libsignal/util/ByteUtil.java index 8f050e006c..45ad5d6461 100644 --- a/libsignal/src/main/java/org/session/libsignal/libsignal/util/ByteUtil.java +++ b/libsignal/src/main/java/org/session/libsignal/libsignal/util/ByteUtil.java @@ -5,6 +5,8 @@ */ package org.session.libsignal.libsignal.util; +import org.session.libsignal.utilities.Hex; + import java.io.ByteArrayOutputStream; import java.io.IOException; import java.text.ParseException; diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/util/Hex.java b/libsignal/src/main/java/org/session/libsignal/libsignal/util/Hex.java deleted file mode 100644 index fd1fad075f..0000000000 --- a/libsignal/src/main/java/org/session/libsignal/libsignal/util/Hex.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright (C) 2014-2016 Open Whisper Systems - * - * Licensed according to the LICENSE file in this repository. - */ -package org.session.libsignal.libsignal.util; - -import java.io.IOException; - -/** - * Utility for generating hex dumps. - */ -public class Hex { - - private final static char[] HEX_DIGITS = { - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' - }; - - public static String toString(byte[] bytes) { - return toString(bytes, 0, bytes.length); - } - - public static String toString(byte[] bytes, int offset, int length) { - StringBuffer buf = new StringBuffer(); - for (int i = 0; i < length; i++) { - appendHexChar(buf, bytes[offset + i]); - buf.append(", "); - } - return buf.toString(); - } - - public static String toStringCondensed(byte[] bytes) { - StringBuffer buf = new StringBuffer(); - for (int i=0;i> 1]; - - for (int i = 0, j = 0; j < len; i++) { - int f = Character.digit(data[j], 16) << 4; - j++; - f = f | Character.digit(data[j], 16); - j++; - out[i] = (byte) (f & 0xFF); - } - - return out; - } - - private static void appendHexChar(StringBuffer buf, int b) { - buf.append(HEX_DIGITS[(b >> 4) & 0xf]); - buf.append(HEX_DIGITS[b & 0xf]); - } - -} diff --git a/libsignal/src/main/java/org/session/libsignal/metadata/SealedSessionCipher.java b/libsignal/src/main/java/org/session/libsignal/metadata/SealedSessionCipher.java index fd7c3de049..6a91f2e502 100644 --- a/libsignal/src/main/java/org/session/libsignal/metadata/SealedSessionCipher.java +++ b/libsignal/src/main/java/org/session/libsignal/metadata/SealedSessionCipher.java @@ -31,7 +31,7 @@ import org.session.libsignal.libsignal.protocol.PreKeySignalMessage; import org.session.libsignal.libsignal.protocol.SignalMessage; import org.session.libsignal.libsignal.state.SignalProtocolStore; import org.session.libsignal.libsignal.util.ByteUtil; -import org.session.libsignal.libsignal.util.Hex; +import org.session.libsignal.utilities.Hex; import org.session.libsignal.libsignal.util.Pair; import java.io.IOException; diff --git a/libsignal/src/main/java/org/session/libsignal/service/api/messages/SignalServiceEnvelope.java b/libsignal/src/main/java/org/session/libsignal/service/api/messages/SignalServiceEnvelope.java index 8a50f3adc8..0593f2521c 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/api/messages/SignalServiceEnvelope.java +++ b/libsignal/src/main/java/org/session/libsignal/service/api/messages/SignalServiceEnvelope.java @@ -11,10 +11,9 @@ import com.google.protobuf.ByteString; import org.session.libsignal.libsignal.InvalidVersionException; import org.session.libsignal.libsignal.logging.Log; import org.session.libsignal.service.api.push.SignalServiceAddress; -import org.session.libsignal.service.internal.push.SignalServiceProtos; import org.session.libsignal.service.internal.push.SignalServiceProtos.Envelope; import org.session.libsignal.service.internal.util.Base64; -import org.session.libsignal.service.internal.util.Hex; +import org.session.libsignal.utilities.Hex; import java.io.IOException; import java.security.InvalidAlgorithmParameterException; diff --git a/libsignal/src/main/java/org/session/libsignal/service/internal/contacts/crypto/ContactDiscoveryCipher.java b/libsignal/src/main/java/org/session/libsignal/service/internal/contacts/crypto/ContactDiscoveryCipher.java index b3d83cd75a..6274da0512 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/internal/contacts/crypto/ContactDiscoveryCipher.java +++ b/libsignal/src/main/java/org/session/libsignal/service/internal/contacts/crypto/ContactDiscoveryCipher.java @@ -9,11 +9,10 @@ import org.threeten.bp.ZonedDateTime; import org.threeten.bp.format.DateTimeFormatter; import org.session.libsignal.libsignal.util.ByteUtil; import org.session.libsignal.service.api.crypto.InvalidCiphertextException; -import org.session.libsignal.service.internal.contacts.crypto.UnauthenticatedQuoteException; import org.session.libsignal.service.internal.contacts.entities.DiscoveryRequest; import org.session.libsignal.service.internal.contacts.entities.DiscoveryResponse; import org.session.libsignal.service.internal.contacts.entities.RemoteAttestationResponse; -import org.session.libsignal.service.internal.util.Hex; +import org.session.libsignal.utilities.Hex; import org.session.libsignal.service.internal.util.JsonUtil; import org.session.libsignal.service.internal.util.Util; diff --git a/libsignal/src/main/java/org/session/libsignal/service/internal/contacts/entities/DiscoveryRequest.java b/libsignal/src/main/java/org/session/libsignal/service/internal/contacts/entities/DiscoveryRequest.java index 61c1437996..cf11cc4da1 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/internal/contacts/entities/DiscoveryRequest.java +++ b/libsignal/src/main/java/org/session/libsignal/service/internal/contacts/entities/DiscoveryRequest.java @@ -18,7 +18,7 @@ package org.session.libsignal.service.internal.contacts.entities; import com.fasterxml.jackson.annotation.JsonProperty; -import org.session.libsignal.service.internal.util.Hex; +import org.session.libsignal.utilities.Hex; public class DiscoveryRequest { diff --git a/libsignal/src/main/java/org/session/libsignal/service/internal/contacts/entities/DiscoveryResponse.java b/libsignal/src/main/java/org/session/libsignal/service/internal/contacts/entities/DiscoveryResponse.java index afaf7f4792..844fac9cea 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/internal/contacts/entities/DiscoveryResponse.java +++ b/libsignal/src/main/java/org/session/libsignal/service/internal/contacts/entities/DiscoveryResponse.java @@ -18,7 +18,7 @@ package org.session.libsignal.service.internal.contacts.entities; import com.fasterxml.jackson.annotation.JsonProperty; -import org.session.libsignal.service.internal.util.Hex; +import org.session.libsignal.utilities.Hex; public class DiscoveryResponse { diff --git a/libsignal/src/main/java/org/session/libsignal/service/internal/push/PushServiceSocket.java b/libsignal/src/main/java/org/session/libsignal/service/internal/push/PushServiceSocket.java index 8b390bcbba..134e09e439 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/internal/push/PushServiceSocket.java +++ b/libsignal/src/main/java/org/session/libsignal/service/internal/push/PushServiceSocket.java @@ -42,27 +42,13 @@ import org.session.libsignal.service.internal.contacts.entities.DiscoveryRequest import org.session.libsignal.service.internal.contacts.entities.DiscoveryResponse; import org.session.libsignal.service.internal.contacts.entities.RemoteAttestationRequest; import org.session.libsignal.service.internal.contacts.entities.RemoteAttestationResponse; -import org.session.libsignal.service.internal.push.AttachmentUploadAttributes; -import org.session.libsignal.service.internal.push.ContactDiscoveryCredentials; -import org.session.libsignal.service.internal.push.ContactDiscoveryFailureReason; -import org.session.libsignal.service.internal.push.ContactTokenDetailsList; -import org.session.libsignal.service.internal.push.DeviceLimitExceededException; -import org.session.libsignal.service.internal.push.OutgoingPushMessageList; -import org.session.libsignal.service.internal.push.PreKeyResponseItem; -import org.session.libsignal.service.internal.push.ProfileAvatarUploadAttributes; -import org.session.libsignal.service.internal.push.ProvisioningMessage; -import org.session.libsignal.service.internal.push.PushAttachmentData; -import org.session.libsignal.service.internal.push.SendMessageResponse; -import org.session.libsignal.service.internal.push.SenderCertificate; -import org.session.libsignal.service.internal.push.SignalServiceEnvelopeEntity; -import org.session.libsignal.service.internal.push.SignalServiceEnvelopeEntityList; import org.session.libsignal.service.internal.push.exceptions.MismatchedDevicesException; import org.session.libsignal.service.internal.push.exceptions.StaleDevicesException; import org.session.libsignal.service.internal.push.http.DigestingRequestBody; import org.session.libsignal.service.internal.push.http.OutputStreamFactory; import org.session.libsignal.service.internal.util.Base64; import org.session.libsignal.service.internal.util.BlacklistingTrustManager; -import org.session.libsignal.service.internal.util.Hex; +import org.session.libsignal.utilities.Hex; import org.session.libsignal.service.internal.util.JsonUtil; import org.session.libsignal.service.internal.util.Util; diff --git a/libsignal/src/main/java/org/session/libsignal/service/internal/util/Hex.java b/libsignal/src/main/java/org/session/libsignal/service/internal/util/Hex.java deleted file mode 100644 index a1f4e695ba..0000000000 --- a/libsignal/src/main/java/org/session/libsignal/service/internal/util/Hex.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * Copyright (C) 2014-2016 Open Whisper Systems - * - * Licensed according to the LICENSE file in this repository. - */ - -package org.session.libsignal.service.internal.util; - -import java.io.IOException; - -/** - * Utility for generating hex dumps. - */ -public class Hex { - - private final static int HEX_DIGITS_START = 10; - private final static int ASCII_TEXT_START = HEX_DIGITS_START + (16*2 + (16/2)); - - final static String EOL = System.getProperty("line.separator"); - - private final static char[] HEX_DIGITS = { - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' - }; - - public static String toString(byte[] bytes) { - return toString(bytes, 0, bytes.length); - } - - public static String toString(byte[] bytes, int offset, int length) { - StringBuffer buf = new StringBuffer(); - for (int i = 0; i < length; i++) { - appendHexChar(buf, bytes[offset + i]); - buf.append(' '); - } - return buf.toString(); - } - - public static String toStringCondensed(byte[] bytes) { - StringBuffer buf = new StringBuffer(); - for (int i=0;i> 1]; - - // two characters form the hex value. - for (int i = 0, j = 0; j < len; i++) { - int f = Character.digit(data[j], 16) << 4; - j++; - f = f | Character.digit(data[j], 16); - j++; - out[i] = (byte) (f & 0xFF); - } - - return out; - } - - public static String dump(byte[] bytes) { - return dump(bytes, 0, bytes.length); - } - - public static String dump(byte[] bytes, int offset, int length) { - StringBuffer buf = new StringBuffer(); - int lines = ((length - 1) / 16) + 1; - int lineOffset; - int lineLength; - - for (int i = 0; i < lines; i++) { - lineOffset = (i * 16) + offset; - lineLength = Math.min(16, (length - (i * 16))); - appendDumpLine(buf, i, bytes, lineOffset, lineLength); - buf.append(EOL); - } - - return buf.toString(); - } - - private static void appendDumpLine(StringBuffer buf, int line, byte[] bytes, int lineOffset, int lineLength) { - buf.append(HEX_DIGITS[(line >> 28) & 0xf]); - buf.append(HEX_DIGITS[(line >> 24) & 0xf]); - buf.append(HEX_DIGITS[(line >> 20) & 0xf]); - buf.append(HEX_DIGITS[(line >> 16) & 0xf]); - buf.append(HEX_DIGITS[(line >> 12) & 0xf]); - buf.append(HEX_DIGITS[(line >> 8) & 0xf]); - buf.append(HEX_DIGITS[(line >> 4) & 0xf]); - buf.append(HEX_DIGITS[(line ) & 0xf]); - buf.append(": "); - - for (int i = 0; i < 16; i++) { - int idx = i + lineOffset; - if (i < lineLength) { - int b = bytes[idx]; - appendHexChar(buf, b); - } else { - buf.append(" "); - } - if ((i % 2) == 1) { - buf.append(' '); - } - } - - for (int i = 0; i < 16 && i < lineLength; i++) { - int idx = i + lineOffset; - int b = bytes[idx]; - if (b >= 0x20 && b <= 0x7e) { - buf.append((char)b); - } else { - buf.append('.'); - } - } - } - - private static void appendHexChar(StringBuffer buf, int b) { - buf.append(HEX_DIGITS[(b >> 4) & 0xf]); - buf.append(HEX_DIGITS[b & 0xf]); - } - -} diff --git a/libsignal/src/main/java/org/session/libsignal/service/loki/api/DotNetAPI.kt b/libsignal/src/main/java/org/session/libsignal/service/loki/api/DotNetAPI.kt index 2271e95394..598032af7e 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/loki/api/DotNetAPI.kt +++ b/libsignal/src/main/java/org/session/libsignal/service/loki/api/DotNetAPI.kt @@ -1,6 +1,5 @@ package org.session.libsignal.service.loki.api -import com.fasterxml.jackson.databind.JsonNode import nl.komponents.kovenant.Promise import nl.komponents.kovenant.functional.bind import nl.komponents.kovenant.functional.map @@ -20,7 +19,7 @@ import org.session.libsignal.service.internal.push.PushAttachmentData import org.session.libsignal.service.internal.push.http.DigestingRequestBody import org.session.libsignal.service.internal.push.http.ProfileCipherOutputStreamFactory import org.session.libsignal.service.internal.util.Base64 -import org.session.libsignal.service.internal.util.Hex +import org.session.libsignal.utilities.Hex import org.session.libsignal.service.internal.util.JsonUtil import org.session.libsignal.service.loki.api.fileserver.FileServerAPI import org.session.libsignal.service.loki.api.onionrequests.OnionRequestAPI diff --git a/libsignal/src/main/java/org/session/libsignal/service/loki/api/fileserver/FileServerAPI.kt b/libsignal/src/main/java/org/session/libsignal/service/loki/api/fileserver/FileServerAPI.kt index f77f297963..6e764d2c65 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/loki/api/fileserver/FileServerAPI.kt +++ b/libsignal/src/main/java/org/session/libsignal/service/loki/api/fileserver/FileServerAPI.kt @@ -1,14 +1,11 @@ package org.session.libsignal.service.loki.api.fileserver import nl.komponents.kovenant.Promise -import nl.komponents.kovenant.functional.bind import nl.komponents.kovenant.functional.map import okhttp3.Request import org.session.libsignal.libsignal.logging.Log -import org.session.libsignal.libsignal.util.Hex import org.session.libsignal.service.internal.util.Base64 import org.session.libsignal.service.internal.util.JsonUtil -import org.session.libsignal.service.loki.api.SnodeAPI import org.session.libsignal.service.loki.api.LokiDotNetAPI import org.session.libsignal.service.loki.api.onionrequests.OnionRequestAPI import org.session.libsignal.service.loki.database.LokiAPIDatabaseProtocol @@ -16,7 +13,6 @@ import org.session.libsignal.service.loki.protocol.shelved.multidevice.DeviceLin import org.session.libsignal.service.loki.utilities.* import java.net.URL import java.util.concurrent.ConcurrentHashMap -import kotlin.collections.set class FileServerAPI(public val server: String, userPublicKey: String, userPrivateKey: ByteArray, private val database: LokiAPIDatabaseProtocol) : LokiDotNetAPI(userPublicKey, userPrivateKey, database) { diff --git a/libsignal/src/main/java/org/session/libsignal/service/loki/api/opengroups/PublicChatAPI.kt b/libsignal/src/main/java/org/session/libsignal/service/loki/api/opengroups/PublicChatAPI.kt index c4fcb0c2c2..6e17672c8a 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/loki/api/opengroups/PublicChatAPI.kt +++ b/libsignal/src/main/java/org/session/libsignal/service/loki/api/opengroups/PublicChatAPI.kt @@ -7,7 +7,7 @@ import nl.komponents.kovenant.functional.map import nl.komponents.kovenant.then import org.session.libsignal.libsignal.logging.Log import org.session.libsignal.service.internal.util.Base64 -import org.session.libsignal.service.internal.util.Hex +import org.session.libsignal.utilities.Hex import org.session.libsignal.service.internal.util.JsonUtil import org.session.libsignal.service.loki.api.LokiDotNetAPI import org.session.libsignal.service.loki.api.SnodeAPI diff --git a/libsignal/src/main/java/org/session/libsignal/service/loki/api/opengroups/PublicChatMessage.kt b/libsignal/src/main/java/org/session/libsignal/service/loki/api/opengroups/PublicChatMessage.kt index f498cb3f9f..b10cbaabd3 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/loki/api/opengroups/PublicChatMessage.kt +++ b/libsignal/src/main/java/org/session/libsignal/service/loki/api/opengroups/PublicChatMessage.kt @@ -2,7 +2,7 @@ package org.session.libsignal.service.loki.api.opengroups import org.whispersystems.curve25519.Curve25519 import org.session.libsignal.libsignal.logging.Log -import org.session.libsignal.service.internal.util.Hex +import org.session.libsignal.utilities.Hex import org.session.libsignal.service.loki.utilities.removing05PrefixIfNeeded public data class PublicChatMessage( diff --git a/libsignal/src/main/java/org/session/libsignal/service/loki/api/utilities/EncryptionUtilities.kt b/libsignal/src/main/java/org/session/libsignal/service/loki/api/utilities/EncryptionUtilities.kt index 7d79a406dc..3ffb480244 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/loki/api/utilities/EncryptionUtilities.kt +++ b/libsignal/src/main/java/org/session/libsignal/service/loki/api/utilities/EncryptionUtilities.kt @@ -2,7 +2,7 @@ package org.session.libsignal.service.loki.api.utilities import org.whispersystems.curve25519.Curve25519 import org.session.libsignal.libsignal.util.ByteUtil -import org.session.libsignal.libsignal.util.Hex +import org.session.libsignal.utilities.Hex import org.session.libsignal.service.internal.util.Util import javax.crypto.Cipher import javax.crypto.Mac diff --git a/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/closedgroups/ClosedGroupSenderKey.kt b/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/closedgroups/ClosedGroupSenderKey.kt index 561f92775a..a406417597 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/closedgroups/ClosedGroupSenderKey.kt +++ b/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/closedgroups/ClosedGroupSenderKey.kt @@ -2,8 +2,7 @@ package org.session.libsignal.service.loki.protocol.closedgroups import com.google.protobuf.ByteString import org.session.libsignal.libsignal.logging.Log -import org.session.libsignal.libsignal.protocol.SignalProtos -import org.session.libsignal.libsignal.util.Hex +import org.session.libsignal.utilities.Hex import org.session.libsignal.service.internal.push.SignalServiceProtos import org.session.libsignal.service.internal.util.JsonUtil import org.session.libsignal.service.loki.utilities.toHexString diff --git a/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/closedgroups/ClosedGroupUtilities.kt b/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/closedgroups/ClosedGroupUtilities.kt index c743641c2e..75bcca22b6 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/closedgroups/ClosedGroupUtilities.kt +++ b/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/closedgroups/ClosedGroupUtilities.kt @@ -3,7 +3,7 @@ package org.session.libsignal.service.loki.protocol.closedgroups import com.google.protobuf.ByteString import org.whispersystems.curve25519.Curve25519 import org.session.libsignal.libsignal.loki.ClosedGroupCiphertextMessage -import org.session.libsignal.libsignal.util.Hex +import org.session.libsignal.utilities.Hex import org.session.libsignal.libsignal.util.Pair import org.session.libsignal.service.api.messages.SignalServiceEnvelope import org.session.libsignal.service.internal.push.SignalServiceProtos diff --git a/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/closedgroups/SharedSenderKeysImplementation.kt b/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/closedgroups/SharedSenderKeysImplementation.kt index 053832e3d5..4a5fe2335e 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/closedgroups/SharedSenderKeysImplementation.kt +++ b/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/closedgroups/SharedSenderKeysImplementation.kt @@ -5,7 +5,7 @@ import org.session.libsignal.libsignal.ecc.DjbECPublicKey import org.session.libsignal.libsignal.ecc.ECKeyPair import org.session.libsignal.libsignal.logging.Log import org.session.libsignal.libsignal.util.ByteUtil -import org.session.libsignal.libsignal.util.Hex +import org.session.libsignal.utilities.Hex import org.session.libsignal.service.internal.util.Util import org.session.libsignal.service.loki.api.utilities.EncryptionUtilities import org.session.libsignal.service.loki.utilities.removing05PrefixIfNeeded diff --git a/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/shelved/multidevice/DeviceLink.kt b/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/shelved/multidevice/DeviceLink.kt index e8c20d3e36..64bfb7eef2 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/shelved/multidevice/DeviceLink.kt +++ b/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/shelved/multidevice/DeviceLink.kt @@ -3,7 +3,7 @@ package org.session.libsignal.service.loki.protocol.shelved.multidevice import org.whispersystems.curve25519.Curve25519 import org.session.libsignal.libsignal.logging.Log import org.session.libsignal.service.internal.util.Base64 -import org.session.libsignal.service.internal.util.Hex +import org.session.libsignal.utilities.Hex import org.session.libsignal.service.loki.utilities.removing05PrefixIfNeeded import java.util.* diff --git a/libsignal/src/main/java/org/session/libsignal/service/loki/utilities/Trimming.kt b/libsignal/src/main/java/org/session/libsignal/service/loki/utilities/Trimming.kt index 5bb7ccace8..3a4115b04b 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/loki/utilities/Trimming.kt +++ b/libsignal/src/main/java/org/session/libsignal/service/loki/utilities/Trimming.kt @@ -1,6 +1,6 @@ package org.session.libsignal.service.loki.utilities -import org.session.libsignal.service.internal.util.Hex +import org.session.libsignal.utilities.Hex fun String.removing05PrefixIfNeeded(): String { return if (length == 66) removePrefix("05") else this diff --git a/libsession/src/main/java/org/session/libsession/utilities/Hex.java b/libsignal/src/main/java/org/session/libsignal/utilities/Hex.java similarity index 98% rename from libsession/src/main/java/org/session/libsession/utilities/Hex.java rename to libsignal/src/main/java/org/session/libsignal/utilities/Hex.java index a731b506fd..0331c5e1c7 100644 --- a/libsession/src/main/java/org/session/libsession/utilities/Hex.java +++ b/libsignal/src/main/java/org/session/libsignal/utilities/Hex.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.session.libsession.utilities; +package org.session.libsignal.utilities; import java.io.IOException;