diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/MmsDownloadJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/MmsDownloadJob.java index 3b3d19b1e7..bb10fc1b0b 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/MmsDownloadJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/MmsDownloadJob.java @@ -26,10 +26,6 @@ import org.thoughtcrime.securesms.mms.MmsRadioException; import org.thoughtcrime.securesms.mms.PartParser; import org.thoughtcrime.securesms.providers.BlobProvider; import org.thoughtcrime.securesms.service.KeyCachingService; -import org.session.libsignal.libsignal.DuplicateMessageException; -import org.session.libsignal.libsignal.InvalidMessageException; -import org.session.libsignal.libsignal.LegacyMessageException; -import org.session.libsignal.libsignal.NoSessionException; import org.session.libsignal.libsignal.util.guava.Optional; import org.session.libsession.messaging.sending_receiving.attachments.Attachment; @@ -160,18 +156,6 @@ public class MmsDownloadJob extends BaseJob { handleDownloadError(messageId, threadId, MmsDatabase.Status.DOWNLOAD_SOFT_FAILURE, automatic); - } catch (DuplicateMessageException e) { - Log.w(TAG, e); - database.markAsDecryptDuplicate(messageId, threadId); - } catch (LegacyMessageException e) { - Log.w(TAG, e); - database.markAsLegacyVersion(messageId, threadId); - } catch (NoSessionException e) { - Log.w(TAG, e); - database.markAsNoSession(messageId, threadId); - } catch (InvalidMessageException e) { - Log.w(TAG, e); - database.markAsDecryptFailed(messageId, threadId); } } @@ -194,8 +178,7 @@ public class MmsDownloadJob extends BaseJob { private void storeRetrievedMms(String contentLocation, long messageId, long threadId, RetrieveConf retrieved, int subscriptionId, @Nullable Address notificationFrom) - throws MmsException, NoSessionException, DuplicateMessageException, InvalidMessageException, - LegacyMessageException + throws MmsException { MmsDatabase database = DatabaseFactory.getMmsDatabase(context); Optional
group = Optional.absent(); diff --git a/app/src/main/java/org/thoughtcrime/securesms/notifications/DefaultMessageNotifier.java b/app/src/main/java/org/thoughtcrime/securesms/notifications/DefaultMessageNotifier.java index dd20a2bf5c..9c7465db43 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/notifications/DefaultMessageNotifier.java +++ b/app/src/main/java/org/thoughtcrime/securesms/notifications/DefaultMessageNotifier.java @@ -55,7 +55,6 @@ import org.thoughtcrime.securesms.loki.protocol.SessionMetaProtocol; import org.thoughtcrime.securesms.loki.utilities.MentionUtilities; import org.thoughtcrime.securesms.mms.SlideDeck; import org.session.libsession.messaging.threads.recipients.Recipient; -import org.thoughtcrime.securesms.service.IncomingMessageObserver; import org.thoughtcrime.securesms.service.KeyCachingService; import org.session.libsession.utilities.ServiceUtil; import org.thoughtcrime.securesms.util.SpanUtil; @@ -87,6 +86,7 @@ public class DefaultMessageNotifier implements MessageNotifier { public static final String EXTRA_REMOTE_REPLY = "extra_remote_reply"; + private static final int FOREGROUND_ID = 313399; private static final int SUMMARY_NOTIFICATION_ID = 1338; private static final int PENDING_MESSAGES_ID = 1111; private static final String NOTIFICATION_GROUP = "messages"; @@ -168,7 +168,7 @@ public class DefaultMessageNotifier implements MessageNotifier { if (notification.getId() != SUMMARY_NOTIFICATION_ID && notification.getId() != KeyCachingService.SERVICE_RUNNING_ID && - notification.getId() != IncomingMessageObserver.FOREGROUND_ID && + notification.getId() != FOREGROUND_ID && notification.getId() != PENDING_MESSAGES_ID) { for (NotificationItem item : notificationState.getNotifications()) { diff --git a/libsignal/protobuf/WhisperTextProtocol.proto b/libsignal/protobuf/WhisperTextProtocol.proto deleted file mode 100644 index a24250f1b6..0000000000 --- a/libsignal/protobuf/WhisperTextProtocol.proto +++ /dev/null @@ -1,57 +0,0 @@ -syntax = "proto2"; - -package textsecure; - -option java_package = "org.session.libsignal.libsignal.protocol"; -option java_outer_classname = "SignalProtos"; - -message SignalMessage { - optional bytes ratchetKey = 1; - optional uint32 counter = 2; - optional uint32 previousCounter = 3; - optional bytes ciphertext = 4; -} - -message PreKeySignalMessage { - optional uint32 registrationId = 5; - optional uint32 preKeyId = 1; - optional uint32 signedPreKeyId = 6; - optional bytes baseKey = 2; - optional bytes identityKey = 3; - optional bytes message = 4; // SignalMessage -} - -message KeyExchangeMessage { - optional uint32 id = 1; - optional bytes baseKey = 2; - optional bytes ratchetKey = 3; - optional bytes identityKey = 4; - optional bytes baseKeySignature = 5; -} - -message SenderKeyMessage { - optional uint32 id = 1; - optional uint32 iteration = 2; - optional bytes ciphertext = 3; -} - -message SenderKeyDistributionMessage { - optional uint32 id = 1; - optional uint32 iteration = 2; - optional bytes chainKey = 3; - optional bytes signingKey = 4; -} - -message DeviceConsistencyCodeMessage { - optional uint32 generation = 1; - optional bytes signature = 2; -} - -message ClosedGroupCiphertextMessage { - // @required - optional bytes ciphertext = 1; - // @required - optional bytes senderPublicKey = 2; - // @required - optional uint32 keyIndex = 3; -} diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/DuplicateMessageException.java b/libsignal/src/main/java/org/session/libsignal/libsignal/DuplicateMessageException.java deleted file mode 100644 index 37273c5bc4..0000000000 --- a/libsignal/src/main/java/org/session/libsignal/libsignal/DuplicateMessageException.java +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (C) 2014-2016 Open Whisper Systems - * - * Licensed according to the LICENSE file in this repository. - */ -package org.session.libsignal.libsignal; - -public class DuplicateMessageException extends Exception { - public DuplicateMessageException(String s) { - super(s); - } -} diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/InvalidKeyIdException.java b/libsignal/src/main/java/org/session/libsignal/libsignal/InvalidKeyIdException.java deleted file mode 100644 index 9d7a33a9aa..0000000000 --- a/libsignal/src/main/java/org/session/libsignal/libsignal/InvalidKeyIdException.java +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (C) 2014-2016 Open Whisper Systems - * - * Licensed according to the LICENSE file in this repository. - */ -package org.session.libsignal.libsignal; - -public class InvalidKeyIdException extends Exception { - public InvalidKeyIdException(String detailMessage) { - super(detailMessage); - } - - public InvalidKeyIdException(Throwable throwable) { - super(throwable); - } -} diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/LegacyMessageException.java b/libsignal/src/main/java/org/session/libsignal/libsignal/LegacyMessageException.java deleted file mode 100644 index 2f1a713568..0000000000 --- a/libsignal/src/main/java/org/session/libsignal/libsignal/LegacyMessageException.java +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (C) 2014-2016 Open Whisper Systems - * - * Licensed according to the LICENSE file in this repository. - */ -package org.session.libsignal.libsignal; - -public class LegacyMessageException extends Exception { - public LegacyMessageException(String s) { - super(s); - } -} diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/NoSessionException.java b/libsignal/src/main/java/org/session/libsignal/libsignal/NoSessionException.java deleted file mode 100644 index fedb2157f6..0000000000 --- a/libsignal/src/main/java/org/session/libsignal/libsignal/NoSessionException.java +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (C) 2014-2016 Open Whisper Systems - * - * Licensed according to the LICENSE file in this repository. - */ -package org.session.libsignal.libsignal; - -public class NoSessionException extends Exception { - public NoSessionException(String s) { - super(s); - } - - public NoSessionException(Exception nested) { - super(nested); - } -} diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/SignalProtocolAddress.java b/libsignal/src/main/java/org/session/libsignal/libsignal/SignalProtocolAddress.java deleted file mode 100644 index 7e329d68b4..0000000000 --- a/libsignal/src/main/java/org/session/libsignal/libsignal/SignalProtocolAddress.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (C) 2014-2016 Open Whisper Systems - * - * Licensed according to the LICENSE file in this repository. - */ -package org.session.libsignal.libsignal; - -public class SignalProtocolAddress { - - private final String name; - private final int deviceId; - - public SignalProtocolAddress(String name, int deviceId) { - this.name = name; - this.deviceId = deviceId; - } - - public String getName() { - return name; - } - - public int getDeviceId() { - return deviceId; - } - - @Override - public String toString() { - return name + ":" + deviceId; - } - - @Override - public boolean equals(Object other) { - if (other == null) return false; - if (!(other instanceof SignalProtocolAddress)) return false; - - SignalProtocolAddress that = (SignalProtocolAddress)other; - return this.name.equals(that.name) && this.deviceId == that.deviceId; - } - - @Override - public int hashCode() { - return this.name.hashCode() ^ this.deviceId; - } -} diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/StaleKeyExchangeException.java b/libsignal/src/main/java/org/session/libsignal/libsignal/StaleKeyExchangeException.java deleted file mode 100644 index 54d832e00a..0000000000 --- a/libsignal/src/main/java/org/session/libsignal/libsignal/StaleKeyExchangeException.java +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (C) 2014-2016 Open Whisper Systems - * - * Licensed according to the LICENSE file in this repository. - */ -package org.session.libsignal.libsignal; - -public class StaleKeyExchangeException extends Throwable { -} diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/UntrustedIdentityException.java b/libsignal/src/main/java/org/session/libsignal/libsignal/UntrustedIdentityException.java deleted file mode 100644 index 56ee6c8959..0000000000 --- a/libsignal/src/main/java/org/session/libsignal/libsignal/UntrustedIdentityException.java +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (C) 2014-2016 Open Whisper Systems - * - * Licensed according to the LICENSE file in this repository. - */ -package org.session.libsignal.libsignal; - -public class UntrustedIdentityException extends Exception { - - private final String name; - private final IdentityKey key; - - public UntrustedIdentityException(String name, IdentityKey key) { - this.name = name; - this.key = key; - } - - public IdentityKey getUntrustedIdentity() { - return key; - } - - public String getName() { - return name; - } -} diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/protocol/SignalProtos.java b/libsignal/src/main/java/org/session/libsignal/libsignal/protocol/SignalProtos.java deleted file mode 100644 index cc5ce7d151..0000000000 --- a/libsignal/src/main/java/org/session/libsignal/libsignal/protocol/SignalProtos.java +++ /dev/null @@ -1,4698 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: WhisperTextProtocol.proto - -package org.session.libsignal.libsignal.protocol; - -public final class SignalProtos { - private SignalProtos() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - public interface SignalMessageOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional bytes ratchetKey = 1; - /** - *optional bytes ratchetKey = 1;
- */
- boolean hasRatchetKey();
- /**
- * optional bytes ratchetKey = 1;
- */
- com.google.protobuf.ByteString getRatchetKey();
-
- // optional uint32 counter = 2;
- /**
- * optional uint32 counter = 2;
- */
- boolean hasCounter();
- /**
- * optional uint32 counter = 2;
- */
- int getCounter();
-
- // optional uint32 previousCounter = 3;
- /**
- * optional uint32 previousCounter = 3;
- */
- boolean hasPreviousCounter();
- /**
- * optional uint32 previousCounter = 3;
- */
- int getPreviousCounter();
-
- // optional bytes ciphertext = 4;
- /**
- * optional bytes ciphertext = 4;
- */
- boolean hasCiphertext();
- /**
- * optional bytes ciphertext = 4;
- */
- com.google.protobuf.ByteString getCiphertext();
- }
- /**
- * Protobuf type {@code textsecure.SignalMessage}
- */
- public static final class SignalMessage extends
- com.google.protobuf.GeneratedMessage
- implements SignalMessageOrBuilder {
- // Use SignalMessage.newBuilder() to construct.
- private SignalMessage(com.google.protobuf.GeneratedMessage.Builder> builder) {
- super(builder);
- this.unknownFields = builder.getUnknownFields();
- }
- private SignalMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
-
- private static final SignalMessage defaultInstance;
- public static SignalMessage getDefaultInstance() {
- return defaultInstance;
- }
-
- public SignalMessage getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- private final com.google.protobuf.UnknownFieldSet unknownFields;
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private SignalMessage(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- initFields();
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- case 10: {
- bitField0_ |= 0x00000001;
- ratchetKey_ = input.readBytes();
- break;
- }
- case 16: {
- bitField0_ |= 0x00000002;
- counter_ = input.readUInt32();
- break;
- }
- case 24: {
- bitField0_ |= 0x00000004;
- previousCounter_ = input.readUInt32();
- break;
- }
- case 34: {
- bitField0_ |= 0x00000008;
- ciphertext_ = input.readBytes();
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.session.libsignal.libsignal.protocol.SignalProtos.internal_static_textsecure_SignalMessage_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.session.libsignal.libsignal.protocol.SignalProtos.internal_static_textsecure_SignalMessage_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.session.libsignal.libsignal.protocol.SignalProtos.SignalMessage.class, org.session.libsignal.libsignal.protocol.SignalProtos.SignalMessage.Builder.class);
- }
-
- public static com.google.protobuf.Parseroptional bytes ratchetKey = 1;
- */
- public boolean hasRatchetKey() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * optional bytes ratchetKey = 1;
- */
- public com.google.protobuf.ByteString getRatchetKey() {
- return ratchetKey_;
- }
-
- // optional uint32 counter = 2;
- public static final int COUNTER_FIELD_NUMBER = 2;
- private int counter_;
- /**
- * optional uint32 counter = 2;
- */
- public boolean hasCounter() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * optional uint32 counter = 2;
- */
- public int getCounter() {
- return counter_;
- }
-
- // optional uint32 previousCounter = 3;
- public static final int PREVIOUSCOUNTER_FIELD_NUMBER = 3;
- private int previousCounter_;
- /**
- * optional uint32 previousCounter = 3;
- */
- public boolean hasPreviousCounter() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- /**
- * optional uint32 previousCounter = 3;
- */
- public int getPreviousCounter() {
- return previousCounter_;
- }
-
- // optional bytes ciphertext = 4;
- public static final int CIPHERTEXT_FIELD_NUMBER = 4;
- private com.google.protobuf.ByteString ciphertext_;
- /**
- * optional bytes ciphertext = 4;
- */
- public boolean hasCiphertext() {
- return ((bitField0_ & 0x00000008) == 0x00000008);
- }
- /**
- * optional bytes ciphertext = 4;
- */
- public com.google.protobuf.ByteString getCiphertext() {
- return ciphertext_;
- }
-
- private void initFields() {
- ratchetKey_ = com.google.protobuf.ByteString.EMPTY;
- counter_ = 0;
- previousCounter_ = 0;
- ciphertext_ = com.google.protobuf.ByteString.EMPTY;
- }
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized != -1) return isInitialized == 1;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- output.writeBytes(1, ratchetKey_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- output.writeUInt32(2, counter_);
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- output.writeUInt32(3, previousCounter_);
- }
- if (((bitField0_ & 0x00000008) == 0x00000008)) {
- output.writeBytes(4, ciphertext_);
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(1, ratchetKey_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- size += com.google.protobuf.CodedOutputStream
- .computeUInt32Size(2, counter_);
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- size += com.google.protobuf.CodedOutputStream
- .computeUInt32Size(3, previousCounter_);
- }
- if (((bitField0_ & 0x00000008) == 0x00000008)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(4, ciphertext_);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- protected java.lang.Object writeReplace()
- throws java.io.ObjectStreamException {
- return super.writeReplace();
- }
-
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SignalMessage parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SignalMessage parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SignalMessage parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SignalMessage parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SignalMessage parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SignalMessage parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SignalMessage parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SignalMessage parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input, extensionRegistry);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SignalMessage parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SignalMessage parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(org.session.libsignal.libsignal.protocol.SignalProtos.SignalMessage prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() { return newBuilder(this); }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code textsecure.SignalMessage}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builderoptional bytes ratchetKey = 1;
- */
- public boolean hasRatchetKey() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * optional bytes ratchetKey = 1;
- */
- public com.google.protobuf.ByteString getRatchetKey() {
- return ratchetKey_;
- }
- /**
- * optional bytes ratchetKey = 1;
- */
- public Builder setRatchetKey(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000001;
- ratchetKey_ = value;
- onChanged();
- return this;
- }
- /**
- * optional bytes ratchetKey = 1;
- */
- public Builder clearRatchetKey() {
- bitField0_ = (bitField0_ & ~0x00000001);
- ratchetKey_ = getDefaultInstance().getRatchetKey();
- onChanged();
- return this;
- }
-
- // optional uint32 counter = 2;
- private int counter_ ;
- /**
- * optional uint32 counter = 2;
- */
- public boolean hasCounter() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * optional uint32 counter = 2;
- */
- public int getCounter() {
- return counter_;
- }
- /**
- * optional uint32 counter = 2;
- */
- public Builder setCounter(int value) {
- bitField0_ |= 0x00000002;
- counter_ = value;
- onChanged();
- return this;
- }
- /**
- * optional uint32 counter = 2;
- */
- public Builder clearCounter() {
- bitField0_ = (bitField0_ & ~0x00000002);
- counter_ = 0;
- onChanged();
- return this;
- }
-
- // optional uint32 previousCounter = 3;
- private int previousCounter_ ;
- /**
- * optional uint32 previousCounter = 3;
- */
- public boolean hasPreviousCounter() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- /**
- * optional uint32 previousCounter = 3;
- */
- public int getPreviousCounter() {
- return previousCounter_;
- }
- /**
- * optional uint32 previousCounter = 3;
- */
- public Builder setPreviousCounter(int value) {
- bitField0_ |= 0x00000004;
- previousCounter_ = value;
- onChanged();
- return this;
- }
- /**
- * optional uint32 previousCounter = 3;
- */
- public Builder clearPreviousCounter() {
- bitField0_ = (bitField0_ & ~0x00000004);
- previousCounter_ = 0;
- onChanged();
- return this;
- }
-
- // optional bytes ciphertext = 4;
- private com.google.protobuf.ByteString ciphertext_ = com.google.protobuf.ByteString.EMPTY;
- /**
- * optional bytes ciphertext = 4;
- */
- public boolean hasCiphertext() {
- return ((bitField0_ & 0x00000008) == 0x00000008);
- }
- /**
- * optional bytes ciphertext = 4;
- */
- public com.google.protobuf.ByteString getCiphertext() {
- return ciphertext_;
- }
- /**
- * optional bytes ciphertext = 4;
- */
- public Builder setCiphertext(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000008;
- ciphertext_ = value;
- onChanged();
- return this;
- }
- /**
- * optional bytes ciphertext = 4;
- */
- public Builder clearCiphertext() {
- bitField0_ = (bitField0_ & ~0x00000008);
- ciphertext_ = getDefaultInstance().getCiphertext();
- onChanged();
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:textsecure.SignalMessage)
- }
-
- static {
- defaultInstance = new SignalMessage(true);
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:textsecure.SignalMessage)
- }
-
- public interface PreKeySignalMessageOrBuilder
- extends com.google.protobuf.MessageOrBuilder {
-
- // optional uint32 registrationId = 5;
- /**
- * optional uint32 registrationId = 5;
- */
- boolean hasRegistrationId();
- /**
- * optional uint32 registrationId = 5;
- */
- int getRegistrationId();
-
- // optional uint32 preKeyId = 1;
- /**
- * optional uint32 preKeyId = 1;
- */
- boolean hasPreKeyId();
- /**
- * optional uint32 preKeyId = 1;
- */
- int getPreKeyId();
-
- // optional uint32 signedPreKeyId = 6;
- /**
- * optional uint32 signedPreKeyId = 6;
- */
- boolean hasSignedPreKeyId();
- /**
- * optional uint32 signedPreKeyId = 6;
- */
- int getSignedPreKeyId();
-
- // optional bytes baseKey = 2;
- /**
- * optional bytes baseKey = 2;
- */
- boolean hasBaseKey();
- /**
- * optional bytes baseKey = 2;
- */
- com.google.protobuf.ByteString getBaseKey();
-
- // optional bytes identityKey = 3;
- /**
- * optional bytes identityKey = 3;
- */
- boolean hasIdentityKey();
- /**
- * optional bytes identityKey = 3;
- */
- com.google.protobuf.ByteString getIdentityKey();
-
- // optional bytes message = 4;
- /**
- * optional bytes message = 4;
- *
- * - * SignalMessage - *- */ - boolean hasMessage(); - /** - *
optional bytes message = 4;
- *
- * - * SignalMessage - *- */ - com.google.protobuf.ByteString getMessage(); - } - /** - * Protobuf type {@code textsecure.PreKeySignalMessage} - */ - public static final class PreKeySignalMessage extends - com.google.protobuf.GeneratedMessage - implements PreKeySignalMessageOrBuilder { - // Use PreKeySignalMessage.newBuilder() to construct. - private PreKeySignalMessage(com.google.protobuf.GeneratedMessage.Builder> builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private PreKeySignalMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final PreKeySignalMessage defaultInstance; - public static PreKeySignalMessage getDefaultInstance() { - return defaultInstance; - } - - public PreKeySignalMessage getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PreKeySignalMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000002; - preKeyId_ = input.readUInt32(); - break; - } - case 18: { - bitField0_ |= 0x00000008; - baseKey_ = input.readBytes(); - break; - } - case 26: { - bitField0_ |= 0x00000010; - identityKey_ = input.readBytes(); - break; - } - case 34: { - bitField0_ |= 0x00000020; - message_ = input.readBytes(); - break; - } - case 40: { - bitField0_ |= 0x00000001; - registrationId_ = input.readUInt32(); - break; - } - case 48: { - bitField0_ |= 0x00000004; - signedPreKeyId_ = input.readUInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.session.libsignal.libsignal.protocol.SignalProtos.internal_static_textsecure_PreKeySignalMessage_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.session.libsignal.libsignal.protocol.SignalProtos.internal_static_textsecure_PreKeySignalMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.session.libsignal.libsignal.protocol.SignalProtos.PreKeySignalMessage.class, org.session.libsignal.libsignal.protocol.SignalProtos.PreKeySignalMessage.Builder.class); - } - - public static com.google.protobuf.Parser
optional uint32 registrationId = 5;
- */
- public boolean hasRegistrationId() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * optional uint32 registrationId = 5;
- */
- public int getRegistrationId() {
- return registrationId_;
- }
-
- // optional uint32 preKeyId = 1;
- public static final int PREKEYID_FIELD_NUMBER = 1;
- private int preKeyId_;
- /**
- * optional uint32 preKeyId = 1;
- */
- public boolean hasPreKeyId() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * optional uint32 preKeyId = 1;
- */
- public int getPreKeyId() {
- return preKeyId_;
- }
-
- // optional uint32 signedPreKeyId = 6;
- public static final int SIGNEDPREKEYID_FIELD_NUMBER = 6;
- private int signedPreKeyId_;
- /**
- * optional uint32 signedPreKeyId = 6;
- */
- public boolean hasSignedPreKeyId() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- /**
- * optional uint32 signedPreKeyId = 6;
- */
- public int getSignedPreKeyId() {
- return signedPreKeyId_;
- }
-
- // optional bytes baseKey = 2;
- public static final int BASEKEY_FIELD_NUMBER = 2;
- private com.google.protobuf.ByteString baseKey_;
- /**
- * optional bytes baseKey = 2;
- */
- public boolean hasBaseKey() {
- return ((bitField0_ & 0x00000008) == 0x00000008);
- }
- /**
- * optional bytes baseKey = 2;
- */
- public com.google.protobuf.ByteString getBaseKey() {
- return baseKey_;
- }
-
- // optional bytes identityKey = 3;
- public static final int IDENTITYKEY_FIELD_NUMBER = 3;
- private com.google.protobuf.ByteString identityKey_;
- /**
- * optional bytes identityKey = 3;
- */
- public boolean hasIdentityKey() {
- return ((bitField0_ & 0x00000010) == 0x00000010);
- }
- /**
- * optional bytes identityKey = 3;
- */
- public com.google.protobuf.ByteString getIdentityKey() {
- return identityKey_;
- }
-
- // optional bytes message = 4;
- public static final int MESSAGE_FIELD_NUMBER = 4;
- private com.google.protobuf.ByteString message_;
- /**
- * optional bytes message = 4;
- *
- * - * SignalMessage - *- */ - public boolean hasMessage() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - *
optional bytes message = 4;
- *
- * - * SignalMessage - *- */ - public com.google.protobuf.ByteString getMessage() { - return message_; - } - - private void initFields() { - registrationId_ = 0; - preKeyId_ = 0; - signedPreKeyId_ = 0; - baseKey_ = com.google.protobuf.ByteString.EMPTY; - identityKey_ = com.google.protobuf.ByteString.EMPTY; - message_ = com.google.protobuf.ByteString.EMPTY; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeUInt32(1, preKeyId_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBytes(2, baseKey_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeBytes(3, identityKey_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeBytes(4, message_); - } - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeUInt32(5, registrationId_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeUInt32(6, signedPreKeyId_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, preKeyId_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, baseKey_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, identityKey_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(4, message_); - } - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(5, registrationId_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(6, signedPreKeyId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.session.libsignal.libsignal.protocol.SignalProtos.PreKeySignalMessage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.session.libsignal.libsignal.protocol.SignalProtos.PreKeySignalMessage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.session.libsignal.libsignal.protocol.SignalProtos.PreKeySignalMessage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.session.libsignal.libsignal.protocol.SignalProtos.PreKeySignalMessage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.session.libsignal.libsignal.protocol.SignalProtos.PreKeySignalMessage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.session.libsignal.libsignal.protocol.SignalProtos.PreKeySignalMessage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.session.libsignal.libsignal.protocol.SignalProtos.PreKeySignalMessage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.session.libsignal.libsignal.protocol.SignalProtos.PreKeySignalMessage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.session.libsignal.libsignal.protocol.SignalProtos.PreKeySignalMessage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.session.libsignal.libsignal.protocol.SignalProtos.PreKeySignalMessage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.session.libsignal.libsignal.protocol.SignalProtos.PreKeySignalMessage prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code textsecure.PreKeySignalMessage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder
optional uint32 registrationId = 5;
- */
- public boolean hasRegistrationId() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * optional uint32 registrationId = 5;
- */
- public int getRegistrationId() {
- return registrationId_;
- }
- /**
- * optional uint32 registrationId = 5;
- */
- public Builder setRegistrationId(int value) {
- bitField0_ |= 0x00000001;
- registrationId_ = value;
- onChanged();
- return this;
- }
- /**
- * optional uint32 registrationId = 5;
- */
- public Builder clearRegistrationId() {
- bitField0_ = (bitField0_ & ~0x00000001);
- registrationId_ = 0;
- onChanged();
- return this;
- }
-
- // optional uint32 preKeyId = 1;
- private int preKeyId_ ;
- /**
- * optional uint32 preKeyId = 1;
- */
- public boolean hasPreKeyId() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * optional uint32 preKeyId = 1;
- */
- public int getPreKeyId() {
- return preKeyId_;
- }
- /**
- * optional uint32 preKeyId = 1;
- */
- public Builder setPreKeyId(int value) {
- bitField0_ |= 0x00000002;
- preKeyId_ = value;
- onChanged();
- return this;
- }
- /**
- * optional uint32 preKeyId = 1;
- */
- public Builder clearPreKeyId() {
- bitField0_ = (bitField0_ & ~0x00000002);
- preKeyId_ = 0;
- onChanged();
- return this;
- }
-
- // optional uint32 signedPreKeyId = 6;
- private int signedPreKeyId_ ;
- /**
- * optional uint32 signedPreKeyId = 6;
- */
- public boolean hasSignedPreKeyId() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- /**
- * optional uint32 signedPreKeyId = 6;
- */
- public int getSignedPreKeyId() {
- return signedPreKeyId_;
- }
- /**
- * optional uint32 signedPreKeyId = 6;
- */
- public Builder setSignedPreKeyId(int value) {
- bitField0_ |= 0x00000004;
- signedPreKeyId_ = value;
- onChanged();
- return this;
- }
- /**
- * optional uint32 signedPreKeyId = 6;
- */
- public Builder clearSignedPreKeyId() {
- bitField0_ = (bitField0_ & ~0x00000004);
- signedPreKeyId_ = 0;
- onChanged();
- return this;
- }
-
- // optional bytes baseKey = 2;
- private com.google.protobuf.ByteString baseKey_ = com.google.protobuf.ByteString.EMPTY;
- /**
- * optional bytes baseKey = 2;
- */
- public boolean hasBaseKey() {
- return ((bitField0_ & 0x00000008) == 0x00000008);
- }
- /**
- * optional bytes baseKey = 2;
- */
- public com.google.protobuf.ByteString getBaseKey() {
- return baseKey_;
- }
- /**
- * optional bytes baseKey = 2;
- */
- public Builder setBaseKey(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000008;
- baseKey_ = value;
- onChanged();
- return this;
- }
- /**
- * optional bytes baseKey = 2;
- */
- public Builder clearBaseKey() {
- bitField0_ = (bitField0_ & ~0x00000008);
- baseKey_ = getDefaultInstance().getBaseKey();
- onChanged();
- return this;
- }
-
- // optional bytes identityKey = 3;
- private com.google.protobuf.ByteString identityKey_ = com.google.protobuf.ByteString.EMPTY;
- /**
- * optional bytes identityKey = 3;
- */
- public boolean hasIdentityKey() {
- return ((bitField0_ & 0x00000010) == 0x00000010);
- }
- /**
- * optional bytes identityKey = 3;
- */
- public com.google.protobuf.ByteString getIdentityKey() {
- return identityKey_;
- }
- /**
- * optional bytes identityKey = 3;
- */
- public Builder setIdentityKey(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000010;
- identityKey_ = value;
- onChanged();
- return this;
- }
- /**
- * optional bytes identityKey = 3;
- */
- public Builder clearIdentityKey() {
- bitField0_ = (bitField0_ & ~0x00000010);
- identityKey_ = getDefaultInstance().getIdentityKey();
- onChanged();
- return this;
- }
-
- // optional bytes message = 4;
- private com.google.protobuf.ByteString message_ = com.google.protobuf.ByteString.EMPTY;
- /**
- * optional bytes message = 4;
- *
- * - * SignalMessage - *- */ - public boolean hasMessage() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - *
optional bytes message = 4;
- *
- * - * SignalMessage - *- */ - public com.google.protobuf.ByteString getMessage() { - return message_; - } - /** - *
optional bytes message = 4;
- *
- * - * SignalMessage - *- */ - public Builder setMessage(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000020; - message_ = value; - onChanged(); - return this; - } - /** - *
optional bytes message = 4;
- *
- * - * SignalMessage - *- */ - public Builder clearMessage() { - bitField0_ = (bitField0_ & ~0x00000020); - message_ = getDefaultInstance().getMessage(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:textsecure.PreKeySignalMessage) - } - - static { - defaultInstance = new PreKeySignalMessage(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:textsecure.PreKeySignalMessage) - } - - public interface KeyExchangeMessageOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional uint32 id = 1; - /** - *
optional uint32 id = 1;
- */
- boolean hasId();
- /**
- * optional uint32 id = 1;
- */
- int getId();
-
- // optional bytes baseKey = 2;
- /**
- * optional bytes baseKey = 2;
- */
- boolean hasBaseKey();
- /**
- * optional bytes baseKey = 2;
- */
- com.google.protobuf.ByteString getBaseKey();
-
- // optional bytes ratchetKey = 3;
- /**
- * optional bytes ratchetKey = 3;
- */
- boolean hasRatchetKey();
- /**
- * optional bytes ratchetKey = 3;
- */
- com.google.protobuf.ByteString getRatchetKey();
-
- // optional bytes identityKey = 4;
- /**
- * optional bytes identityKey = 4;
- */
- boolean hasIdentityKey();
- /**
- * optional bytes identityKey = 4;
- */
- com.google.protobuf.ByteString getIdentityKey();
-
- // optional bytes baseKeySignature = 5;
- /**
- * optional bytes baseKeySignature = 5;
- */
- boolean hasBaseKeySignature();
- /**
- * optional bytes baseKeySignature = 5;
- */
- com.google.protobuf.ByteString getBaseKeySignature();
- }
- /**
- * Protobuf type {@code textsecure.KeyExchangeMessage}
- */
- public static final class KeyExchangeMessage extends
- com.google.protobuf.GeneratedMessage
- implements KeyExchangeMessageOrBuilder {
- // Use KeyExchangeMessage.newBuilder() to construct.
- private KeyExchangeMessage(com.google.protobuf.GeneratedMessage.Builder> builder) {
- super(builder);
- this.unknownFields = builder.getUnknownFields();
- }
- private KeyExchangeMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
-
- private static final KeyExchangeMessage defaultInstance;
- public static KeyExchangeMessage getDefaultInstance() {
- return defaultInstance;
- }
-
- public KeyExchangeMessage getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- private final com.google.protobuf.UnknownFieldSet unknownFields;
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private KeyExchangeMessage(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- initFields();
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- case 8: {
- bitField0_ |= 0x00000001;
- id_ = input.readUInt32();
- break;
- }
- case 18: {
- bitField0_ |= 0x00000002;
- baseKey_ = input.readBytes();
- break;
- }
- case 26: {
- bitField0_ |= 0x00000004;
- ratchetKey_ = input.readBytes();
- break;
- }
- case 34: {
- bitField0_ |= 0x00000008;
- identityKey_ = input.readBytes();
- break;
- }
- case 42: {
- bitField0_ |= 0x00000010;
- baseKeySignature_ = input.readBytes();
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.session.libsignal.libsignal.protocol.SignalProtos.internal_static_textsecure_KeyExchangeMessage_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.session.libsignal.libsignal.protocol.SignalProtos.internal_static_textsecure_KeyExchangeMessage_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.session.libsignal.libsignal.protocol.SignalProtos.KeyExchangeMessage.class, org.session.libsignal.libsignal.protocol.SignalProtos.KeyExchangeMessage.Builder.class);
- }
-
- public static com.google.protobuf.Parseroptional uint32 id = 1;
- */
- public boolean hasId() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * optional uint32 id = 1;
- */
- public int getId() {
- return id_;
- }
-
- // optional bytes baseKey = 2;
- public static final int BASEKEY_FIELD_NUMBER = 2;
- private com.google.protobuf.ByteString baseKey_;
- /**
- * optional bytes baseKey = 2;
- */
- public boolean hasBaseKey() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * optional bytes baseKey = 2;
- */
- public com.google.protobuf.ByteString getBaseKey() {
- return baseKey_;
- }
-
- // optional bytes ratchetKey = 3;
- public static final int RATCHETKEY_FIELD_NUMBER = 3;
- private com.google.protobuf.ByteString ratchetKey_;
- /**
- * optional bytes ratchetKey = 3;
- */
- public boolean hasRatchetKey() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- /**
- * optional bytes ratchetKey = 3;
- */
- public com.google.protobuf.ByteString getRatchetKey() {
- return ratchetKey_;
- }
-
- // optional bytes identityKey = 4;
- public static final int IDENTITYKEY_FIELD_NUMBER = 4;
- private com.google.protobuf.ByteString identityKey_;
- /**
- * optional bytes identityKey = 4;
- */
- public boolean hasIdentityKey() {
- return ((bitField0_ & 0x00000008) == 0x00000008);
- }
- /**
- * optional bytes identityKey = 4;
- */
- public com.google.protobuf.ByteString getIdentityKey() {
- return identityKey_;
- }
-
- // optional bytes baseKeySignature = 5;
- public static final int BASEKEYSIGNATURE_FIELD_NUMBER = 5;
- private com.google.protobuf.ByteString baseKeySignature_;
- /**
- * optional bytes baseKeySignature = 5;
- */
- public boolean hasBaseKeySignature() {
- return ((bitField0_ & 0x00000010) == 0x00000010);
- }
- /**
- * optional bytes baseKeySignature = 5;
- */
- public com.google.protobuf.ByteString getBaseKeySignature() {
- return baseKeySignature_;
- }
-
- private void initFields() {
- id_ = 0;
- baseKey_ = com.google.protobuf.ByteString.EMPTY;
- ratchetKey_ = com.google.protobuf.ByteString.EMPTY;
- identityKey_ = com.google.protobuf.ByteString.EMPTY;
- baseKeySignature_ = com.google.protobuf.ByteString.EMPTY;
- }
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized != -1) return isInitialized == 1;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- output.writeUInt32(1, id_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- output.writeBytes(2, baseKey_);
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- output.writeBytes(3, ratchetKey_);
- }
- if (((bitField0_ & 0x00000008) == 0x00000008)) {
- output.writeBytes(4, identityKey_);
- }
- if (((bitField0_ & 0x00000010) == 0x00000010)) {
- output.writeBytes(5, baseKeySignature_);
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- size += com.google.protobuf.CodedOutputStream
- .computeUInt32Size(1, id_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(2, baseKey_);
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(3, ratchetKey_);
- }
- if (((bitField0_ & 0x00000008) == 0x00000008)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(4, identityKey_);
- }
- if (((bitField0_ & 0x00000010) == 0x00000010)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(5, baseKeySignature_);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- protected java.lang.Object writeReplace()
- throws java.io.ObjectStreamException {
- return super.writeReplace();
- }
-
- public static org.session.libsignal.libsignal.protocol.SignalProtos.KeyExchangeMessage parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.KeyExchangeMessage parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.KeyExchangeMessage parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.KeyExchangeMessage parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.KeyExchangeMessage parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.KeyExchangeMessage parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.KeyExchangeMessage parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.KeyExchangeMessage parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input, extensionRegistry);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.KeyExchangeMessage parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.KeyExchangeMessage parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(org.session.libsignal.libsignal.protocol.SignalProtos.KeyExchangeMessage prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() { return newBuilder(this); }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code textsecure.KeyExchangeMessage}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builderoptional uint32 id = 1;
- */
- public boolean hasId() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * optional uint32 id = 1;
- */
- public int getId() {
- return id_;
- }
- /**
- * optional uint32 id = 1;
- */
- public Builder setId(int value) {
- bitField0_ |= 0x00000001;
- id_ = value;
- onChanged();
- return this;
- }
- /**
- * optional uint32 id = 1;
- */
- public Builder clearId() {
- bitField0_ = (bitField0_ & ~0x00000001);
- id_ = 0;
- onChanged();
- return this;
- }
-
- // optional bytes baseKey = 2;
- private com.google.protobuf.ByteString baseKey_ = com.google.protobuf.ByteString.EMPTY;
- /**
- * optional bytes baseKey = 2;
- */
- public boolean hasBaseKey() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * optional bytes baseKey = 2;
- */
- public com.google.protobuf.ByteString getBaseKey() {
- return baseKey_;
- }
- /**
- * optional bytes baseKey = 2;
- */
- public Builder setBaseKey(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000002;
- baseKey_ = value;
- onChanged();
- return this;
- }
- /**
- * optional bytes baseKey = 2;
- */
- public Builder clearBaseKey() {
- bitField0_ = (bitField0_ & ~0x00000002);
- baseKey_ = getDefaultInstance().getBaseKey();
- onChanged();
- return this;
- }
-
- // optional bytes ratchetKey = 3;
- private com.google.protobuf.ByteString ratchetKey_ = com.google.protobuf.ByteString.EMPTY;
- /**
- * optional bytes ratchetKey = 3;
- */
- public boolean hasRatchetKey() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- /**
- * optional bytes ratchetKey = 3;
- */
- public com.google.protobuf.ByteString getRatchetKey() {
- return ratchetKey_;
- }
- /**
- * optional bytes ratchetKey = 3;
- */
- public Builder setRatchetKey(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000004;
- ratchetKey_ = value;
- onChanged();
- return this;
- }
- /**
- * optional bytes ratchetKey = 3;
- */
- public Builder clearRatchetKey() {
- bitField0_ = (bitField0_ & ~0x00000004);
- ratchetKey_ = getDefaultInstance().getRatchetKey();
- onChanged();
- return this;
- }
-
- // optional bytes identityKey = 4;
- private com.google.protobuf.ByteString identityKey_ = com.google.protobuf.ByteString.EMPTY;
- /**
- * optional bytes identityKey = 4;
- */
- public boolean hasIdentityKey() {
- return ((bitField0_ & 0x00000008) == 0x00000008);
- }
- /**
- * optional bytes identityKey = 4;
- */
- public com.google.protobuf.ByteString getIdentityKey() {
- return identityKey_;
- }
- /**
- * optional bytes identityKey = 4;
- */
- public Builder setIdentityKey(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000008;
- identityKey_ = value;
- onChanged();
- return this;
- }
- /**
- * optional bytes identityKey = 4;
- */
- public Builder clearIdentityKey() {
- bitField0_ = (bitField0_ & ~0x00000008);
- identityKey_ = getDefaultInstance().getIdentityKey();
- onChanged();
- return this;
- }
-
- // optional bytes baseKeySignature = 5;
- private com.google.protobuf.ByteString baseKeySignature_ = com.google.protobuf.ByteString.EMPTY;
- /**
- * optional bytes baseKeySignature = 5;
- */
- public boolean hasBaseKeySignature() {
- return ((bitField0_ & 0x00000010) == 0x00000010);
- }
- /**
- * optional bytes baseKeySignature = 5;
- */
- public com.google.protobuf.ByteString getBaseKeySignature() {
- return baseKeySignature_;
- }
- /**
- * optional bytes baseKeySignature = 5;
- */
- public Builder setBaseKeySignature(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000010;
- baseKeySignature_ = value;
- onChanged();
- return this;
- }
- /**
- * optional bytes baseKeySignature = 5;
- */
- public Builder clearBaseKeySignature() {
- bitField0_ = (bitField0_ & ~0x00000010);
- baseKeySignature_ = getDefaultInstance().getBaseKeySignature();
- onChanged();
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:textsecure.KeyExchangeMessage)
- }
-
- static {
- defaultInstance = new KeyExchangeMessage(true);
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:textsecure.KeyExchangeMessage)
- }
-
- public interface SenderKeyMessageOrBuilder
- extends com.google.protobuf.MessageOrBuilder {
-
- // optional uint32 id = 1;
- /**
- * optional uint32 id = 1;
- */
- boolean hasId();
- /**
- * optional uint32 id = 1;
- */
- int getId();
-
- // optional uint32 iteration = 2;
- /**
- * optional uint32 iteration = 2;
- */
- boolean hasIteration();
- /**
- * optional uint32 iteration = 2;
- */
- int getIteration();
-
- // optional bytes ciphertext = 3;
- /**
- * optional bytes ciphertext = 3;
- */
- boolean hasCiphertext();
- /**
- * optional bytes ciphertext = 3;
- */
- com.google.protobuf.ByteString getCiphertext();
- }
- /**
- * Protobuf type {@code textsecure.SenderKeyMessage}
- */
- public static final class SenderKeyMessage extends
- com.google.protobuf.GeneratedMessage
- implements SenderKeyMessageOrBuilder {
- // Use SenderKeyMessage.newBuilder() to construct.
- private SenderKeyMessage(com.google.protobuf.GeneratedMessage.Builder> builder) {
- super(builder);
- this.unknownFields = builder.getUnknownFields();
- }
- private SenderKeyMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
-
- private static final SenderKeyMessage defaultInstance;
- public static SenderKeyMessage getDefaultInstance() {
- return defaultInstance;
- }
-
- public SenderKeyMessage getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- private final com.google.protobuf.UnknownFieldSet unknownFields;
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private SenderKeyMessage(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- initFields();
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- case 8: {
- bitField0_ |= 0x00000001;
- id_ = input.readUInt32();
- break;
- }
- case 16: {
- bitField0_ |= 0x00000002;
- iteration_ = input.readUInt32();
- break;
- }
- case 26: {
- bitField0_ |= 0x00000004;
- ciphertext_ = input.readBytes();
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.session.libsignal.libsignal.protocol.SignalProtos.internal_static_textsecure_SenderKeyMessage_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.session.libsignal.libsignal.protocol.SignalProtos.internal_static_textsecure_SenderKeyMessage_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyMessage.class, org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyMessage.Builder.class);
- }
-
- public static com.google.protobuf.Parseroptional uint32 id = 1;
- */
- public boolean hasId() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * optional uint32 id = 1;
- */
- public int getId() {
- return id_;
- }
-
- // optional uint32 iteration = 2;
- public static final int ITERATION_FIELD_NUMBER = 2;
- private int iteration_;
- /**
- * optional uint32 iteration = 2;
- */
- public boolean hasIteration() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * optional uint32 iteration = 2;
- */
- public int getIteration() {
- return iteration_;
- }
-
- // optional bytes ciphertext = 3;
- public static final int CIPHERTEXT_FIELD_NUMBER = 3;
- private com.google.protobuf.ByteString ciphertext_;
- /**
- * optional bytes ciphertext = 3;
- */
- public boolean hasCiphertext() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- /**
- * optional bytes ciphertext = 3;
- */
- public com.google.protobuf.ByteString getCiphertext() {
- return ciphertext_;
- }
-
- private void initFields() {
- id_ = 0;
- iteration_ = 0;
- ciphertext_ = com.google.protobuf.ByteString.EMPTY;
- }
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized != -1) return isInitialized == 1;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- output.writeUInt32(1, id_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- output.writeUInt32(2, iteration_);
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- output.writeBytes(3, ciphertext_);
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- size += com.google.protobuf.CodedOutputStream
- .computeUInt32Size(1, id_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- size += com.google.protobuf.CodedOutputStream
- .computeUInt32Size(2, iteration_);
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(3, ciphertext_);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- protected java.lang.Object writeReplace()
- throws java.io.ObjectStreamException {
- return super.writeReplace();
- }
-
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyMessage parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyMessage parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyMessage parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyMessage parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyMessage parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyMessage parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyMessage parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyMessage parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input, extensionRegistry);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyMessage parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyMessage parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyMessage prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() { return newBuilder(this); }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code textsecure.SenderKeyMessage}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builderoptional uint32 id = 1;
- */
- public boolean hasId() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * optional uint32 id = 1;
- */
- public int getId() {
- return id_;
- }
- /**
- * optional uint32 id = 1;
- */
- public Builder setId(int value) {
- bitField0_ |= 0x00000001;
- id_ = value;
- onChanged();
- return this;
- }
- /**
- * optional uint32 id = 1;
- */
- public Builder clearId() {
- bitField0_ = (bitField0_ & ~0x00000001);
- id_ = 0;
- onChanged();
- return this;
- }
-
- // optional uint32 iteration = 2;
- private int iteration_ ;
- /**
- * optional uint32 iteration = 2;
- */
- public boolean hasIteration() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * optional uint32 iteration = 2;
- */
- public int getIteration() {
- return iteration_;
- }
- /**
- * optional uint32 iteration = 2;
- */
- public Builder setIteration(int value) {
- bitField0_ |= 0x00000002;
- iteration_ = value;
- onChanged();
- return this;
- }
- /**
- * optional uint32 iteration = 2;
- */
- public Builder clearIteration() {
- bitField0_ = (bitField0_ & ~0x00000002);
- iteration_ = 0;
- onChanged();
- return this;
- }
-
- // optional bytes ciphertext = 3;
- private com.google.protobuf.ByteString ciphertext_ = com.google.protobuf.ByteString.EMPTY;
- /**
- * optional bytes ciphertext = 3;
- */
- public boolean hasCiphertext() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- /**
- * optional bytes ciphertext = 3;
- */
- public com.google.protobuf.ByteString getCiphertext() {
- return ciphertext_;
- }
- /**
- * optional bytes ciphertext = 3;
- */
- public Builder setCiphertext(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000004;
- ciphertext_ = value;
- onChanged();
- return this;
- }
- /**
- * optional bytes ciphertext = 3;
- */
- public Builder clearCiphertext() {
- bitField0_ = (bitField0_ & ~0x00000004);
- ciphertext_ = getDefaultInstance().getCiphertext();
- onChanged();
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:textsecure.SenderKeyMessage)
- }
-
- static {
- defaultInstance = new SenderKeyMessage(true);
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:textsecure.SenderKeyMessage)
- }
-
- public interface SenderKeyDistributionMessageOrBuilder
- extends com.google.protobuf.MessageOrBuilder {
-
- // optional uint32 id = 1;
- /**
- * optional uint32 id = 1;
- */
- boolean hasId();
- /**
- * optional uint32 id = 1;
- */
- int getId();
-
- // optional uint32 iteration = 2;
- /**
- * optional uint32 iteration = 2;
- */
- boolean hasIteration();
- /**
- * optional uint32 iteration = 2;
- */
- int getIteration();
-
- // optional bytes chainKey = 3;
- /**
- * optional bytes chainKey = 3;
- */
- boolean hasChainKey();
- /**
- * optional bytes chainKey = 3;
- */
- com.google.protobuf.ByteString getChainKey();
-
- // optional bytes signingKey = 4;
- /**
- * optional bytes signingKey = 4;
- */
- boolean hasSigningKey();
- /**
- * optional bytes signingKey = 4;
- */
- com.google.protobuf.ByteString getSigningKey();
- }
- /**
- * Protobuf type {@code textsecure.SenderKeyDistributionMessage}
- */
- public static final class SenderKeyDistributionMessage extends
- com.google.protobuf.GeneratedMessage
- implements SenderKeyDistributionMessageOrBuilder {
- // Use SenderKeyDistributionMessage.newBuilder() to construct.
- private SenderKeyDistributionMessage(com.google.protobuf.GeneratedMessage.Builder> builder) {
- super(builder);
- this.unknownFields = builder.getUnknownFields();
- }
- private SenderKeyDistributionMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
-
- private static final SenderKeyDistributionMessage defaultInstance;
- public static SenderKeyDistributionMessage getDefaultInstance() {
- return defaultInstance;
- }
-
- public SenderKeyDistributionMessage getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- private final com.google.protobuf.UnknownFieldSet unknownFields;
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private SenderKeyDistributionMessage(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- initFields();
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- case 8: {
- bitField0_ |= 0x00000001;
- id_ = input.readUInt32();
- break;
- }
- case 16: {
- bitField0_ |= 0x00000002;
- iteration_ = input.readUInt32();
- break;
- }
- case 26: {
- bitField0_ |= 0x00000004;
- chainKey_ = input.readBytes();
- break;
- }
- case 34: {
- bitField0_ |= 0x00000008;
- signingKey_ = input.readBytes();
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.session.libsignal.libsignal.protocol.SignalProtos.internal_static_textsecure_SenderKeyDistributionMessage_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.session.libsignal.libsignal.protocol.SignalProtos.internal_static_textsecure_SenderKeyDistributionMessage_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage.class, org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage.Builder.class);
- }
-
- public static com.google.protobuf.Parseroptional uint32 id = 1;
- */
- public boolean hasId() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * optional uint32 id = 1;
- */
- public int getId() {
- return id_;
- }
-
- // optional uint32 iteration = 2;
- public static final int ITERATION_FIELD_NUMBER = 2;
- private int iteration_;
- /**
- * optional uint32 iteration = 2;
- */
- public boolean hasIteration() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * optional uint32 iteration = 2;
- */
- public int getIteration() {
- return iteration_;
- }
-
- // optional bytes chainKey = 3;
- public static final int CHAINKEY_FIELD_NUMBER = 3;
- private com.google.protobuf.ByteString chainKey_;
- /**
- * optional bytes chainKey = 3;
- */
- public boolean hasChainKey() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- /**
- * optional bytes chainKey = 3;
- */
- public com.google.protobuf.ByteString getChainKey() {
- return chainKey_;
- }
-
- // optional bytes signingKey = 4;
- public static final int SIGNINGKEY_FIELD_NUMBER = 4;
- private com.google.protobuf.ByteString signingKey_;
- /**
- * optional bytes signingKey = 4;
- */
- public boolean hasSigningKey() {
- return ((bitField0_ & 0x00000008) == 0x00000008);
- }
- /**
- * optional bytes signingKey = 4;
- */
- public com.google.protobuf.ByteString getSigningKey() {
- return signingKey_;
- }
-
- private void initFields() {
- id_ = 0;
- iteration_ = 0;
- chainKey_ = com.google.protobuf.ByteString.EMPTY;
- signingKey_ = com.google.protobuf.ByteString.EMPTY;
- }
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized != -1) return isInitialized == 1;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- output.writeUInt32(1, id_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- output.writeUInt32(2, iteration_);
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- output.writeBytes(3, chainKey_);
- }
- if (((bitField0_ & 0x00000008) == 0x00000008)) {
- output.writeBytes(4, signingKey_);
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- size += com.google.protobuf.CodedOutputStream
- .computeUInt32Size(1, id_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- size += com.google.protobuf.CodedOutputStream
- .computeUInt32Size(2, iteration_);
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(3, chainKey_);
- }
- if (((bitField0_ & 0x00000008) == 0x00000008)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(4, signingKey_);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- protected java.lang.Object writeReplace()
- throws java.io.ObjectStreamException {
- return super.writeReplace();
- }
-
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input, extensionRegistry);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() { return newBuilder(this); }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code textsecure.SenderKeyDistributionMessage}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builderoptional uint32 id = 1;
- */
- public boolean hasId() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * optional uint32 id = 1;
- */
- public int getId() {
- return id_;
- }
- /**
- * optional uint32 id = 1;
- */
- public Builder setId(int value) {
- bitField0_ |= 0x00000001;
- id_ = value;
- onChanged();
- return this;
- }
- /**
- * optional uint32 id = 1;
- */
- public Builder clearId() {
- bitField0_ = (bitField0_ & ~0x00000001);
- id_ = 0;
- onChanged();
- return this;
- }
-
- // optional uint32 iteration = 2;
- private int iteration_ ;
- /**
- * optional uint32 iteration = 2;
- */
- public boolean hasIteration() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * optional uint32 iteration = 2;
- */
- public int getIteration() {
- return iteration_;
- }
- /**
- * optional uint32 iteration = 2;
- */
- public Builder setIteration(int value) {
- bitField0_ |= 0x00000002;
- iteration_ = value;
- onChanged();
- return this;
- }
- /**
- * optional uint32 iteration = 2;
- */
- public Builder clearIteration() {
- bitField0_ = (bitField0_ & ~0x00000002);
- iteration_ = 0;
- onChanged();
- return this;
- }
-
- // optional bytes chainKey = 3;
- private com.google.protobuf.ByteString chainKey_ = com.google.protobuf.ByteString.EMPTY;
- /**
- * optional bytes chainKey = 3;
- */
- public boolean hasChainKey() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- /**
- * optional bytes chainKey = 3;
- */
- public com.google.protobuf.ByteString getChainKey() {
- return chainKey_;
- }
- /**
- * optional bytes chainKey = 3;
- */
- public Builder setChainKey(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000004;
- chainKey_ = value;
- onChanged();
- return this;
- }
- /**
- * optional bytes chainKey = 3;
- */
- public Builder clearChainKey() {
- bitField0_ = (bitField0_ & ~0x00000004);
- chainKey_ = getDefaultInstance().getChainKey();
- onChanged();
- return this;
- }
-
- // optional bytes signingKey = 4;
- private com.google.protobuf.ByteString signingKey_ = com.google.protobuf.ByteString.EMPTY;
- /**
- * optional bytes signingKey = 4;
- */
- public boolean hasSigningKey() {
- return ((bitField0_ & 0x00000008) == 0x00000008);
- }
- /**
- * optional bytes signingKey = 4;
- */
- public com.google.protobuf.ByteString getSigningKey() {
- return signingKey_;
- }
- /**
- * optional bytes signingKey = 4;
- */
- public Builder setSigningKey(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000008;
- signingKey_ = value;
- onChanged();
- return this;
- }
- /**
- * optional bytes signingKey = 4;
- */
- public Builder clearSigningKey() {
- bitField0_ = (bitField0_ & ~0x00000008);
- signingKey_ = getDefaultInstance().getSigningKey();
- onChanged();
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:textsecure.SenderKeyDistributionMessage)
- }
-
- static {
- defaultInstance = new SenderKeyDistributionMessage(true);
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:textsecure.SenderKeyDistributionMessage)
- }
-
- public interface DeviceConsistencyCodeMessageOrBuilder
- extends com.google.protobuf.MessageOrBuilder {
-
- // optional uint32 generation = 1;
- /**
- * optional uint32 generation = 1;
- */
- boolean hasGeneration();
- /**
- * optional uint32 generation = 1;
- */
- int getGeneration();
-
- // optional bytes signature = 2;
- /**
- * optional bytes signature = 2;
- */
- boolean hasSignature();
- /**
- * optional bytes signature = 2;
- */
- com.google.protobuf.ByteString getSignature();
- }
- /**
- * Protobuf type {@code textsecure.DeviceConsistencyCodeMessage}
- */
- public static final class DeviceConsistencyCodeMessage extends
- com.google.protobuf.GeneratedMessage
- implements DeviceConsistencyCodeMessageOrBuilder {
- // Use DeviceConsistencyCodeMessage.newBuilder() to construct.
- private DeviceConsistencyCodeMessage(com.google.protobuf.GeneratedMessage.Builder> builder) {
- super(builder);
- this.unknownFields = builder.getUnknownFields();
- }
- private DeviceConsistencyCodeMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
-
- private static final DeviceConsistencyCodeMessage defaultInstance;
- public static DeviceConsistencyCodeMessage getDefaultInstance() {
- return defaultInstance;
- }
-
- public DeviceConsistencyCodeMessage getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- private final com.google.protobuf.UnknownFieldSet unknownFields;
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private DeviceConsistencyCodeMessage(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- initFields();
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- case 8: {
- bitField0_ |= 0x00000001;
- generation_ = input.readUInt32();
- break;
- }
- case 18: {
- bitField0_ |= 0x00000002;
- signature_ = input.readBytes();
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.session.libsignal.libsignal.protocol.SignalProtos.internal_static_textsecure_DeviceConsistencyCodeMessage_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.session.libsignal.libsignal.protocol.SignalProtos.internal_static_textsecure_DeviceConsistencyCodeMessage_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.session.libsignal.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage.class, org.session.libsignal.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage.Builder.class);
- }
-
- public static com.google.protobuf.Parseroptional uint32 generation = 1;
- */
- public boolean hasGeneration() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * optional uint32 generation = 1;
- */
- public int getGeneration() {
- return generation_;
- }
-
- // optional bytes signature = 2;
- public static final int SIGNATURE_FIELD_NUMBER = 2;
- private com.google.protobuf.ByteString signature_;
- /**
- * optional bytes signature = 2;
- */
- public boolean hasSignature() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * optional bytes signature = 2;
- */
- public com.google.protobuf.ByteString getSignature() {
- return signature_;
- }
-
- private void initFields() {
- generation_ = 0;
- signature_ = com.google.protobuf.ByteString.EMPTY;
- }
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized != -1) return isInitialized == 1;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- output.writeUInt32(1, generation_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- output.writeBytes(2, signature_);
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- size += com.google.protobuf.CodedOutputStream
- .computeUInt32Size(1, generation_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(2, signature_);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- protected java.lang.Object writeReplace()
- throws java.io.ObjectStreamException {
- return super.writeReplace();
- }
-
- public static org.session.libsignal.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input, extensionRegistry);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static org.session.libsignal.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(org.session.libsignal.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() { return newBuilder(this); }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code textsecure.DeviceConsistencyCodeMessage}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builderoptional uint32 generation = 1;
- */
- public boolean hasGeneration() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * optional uint32 generation = 1;
- */
- public int getGeneration() {
- return generation_;
- }
- /**
- * optional uint32 generation = 1;
- */
- public Builder setGeneration(int value) {
- bitField0_ |= 0x00000001;
- generation_ = value;
- onChanged();
- return this;
- }
- /**
- * optional uint32 generation = 1;
- */
- public Builder clearGeneration() {
- bitField0_ = (bitField0_ & ~0x00000001);
- generation_ = 0;
- onChanged();
- return this;
- }
-
- // optional bytes signature = 2;
- private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY;
- /**
- * optional bytes signature = 2;
- */
- public boolean hasSignature() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * optional bytes signature = 2;
- */
- public com.google.protobuf.ByteString getSignature() {
- return signature_;
- }
- /**
- * optional bytes signature = 2;
- */
- public Builder setSignature(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000002;
- signature_ = value;
- onChanged();
- return this;
- }
- /**
- * optional bytes signature = 2;
- */
- public Builder clearSignature() {
- bitField0_ = (bitField0_ & ~0x00000002);
- signature_ = getDefaultInstance().getSignature();
- onChanged();
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:textsecure.DeviceConsistencyCodeMessage)
- }
-
- static {
- defaultInstance = new DeviceConsistencyCodeMessage(true);
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:textsecure.DeviceConsistencyCodeMessage)
- }
-
- public interface ClosedGroupCiphertextMessageOrBuilder
- extends com.google.protobuf.MessageOrBuilder {
-
- // optional bytes ciphertext = 1;
- /**
- * optional bytes ciphertext = 1;
- *
- * - * @required - *- */ - boolean hasCiphertext(); - /** - *
optional bytes ciphertext = 1;
- *
- * - * @required - *- */ - com.google.protobuf.ByteString getCiphertext(); - - // optional bytes senderPublicKey = 2; - /** - *
optional bytes senderPublicKey = 2;
- *
- * - * @required - *- */ - boolean hasSenderPublicKey(); - /** - *
optional bytes senderPublicKey = 2;
- *
- * - * @required - *- */ - com.google.protobuf.ByteString getSenderPublicKey(); - - // optional uint32 keyIndex = 3; - /** - *
optional uint32 keyIndex = 3;
- *
- * - * @required - *- */ - boolean hasKeyIndex(); - /** - *
optional uint32 keyIndex = 3;
- *
- * - * @required - *- */ - int getKeyIndex(); - } - /** - * Protobuf type {@code textsecure.ClosedGroupCiphertextMessage} - */ - public static final class ClosedGroupCiphertextMessage extends - com.google.protobuf.GeneratedMessage - implements ClosedGroupCiphertextMessageOrBuilder { - // Use ClosedGroupCiphertextMessage.newBuilder() to construct. - private ClosedGroupCiphertextMessage(com.google.protobuf.GeneratedMessage.Builder> builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private ClosedGroupCiphertextMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final ClosedGroupCiphertextMessage defaultInstance; - public static ClosedGroupCiphertextMessage getDefaultInstance() { - return defaultInstance; - } - - public ClosedGroupCiphertextMessage getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ClosedGroupCiphertextMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - ciphertext_ = input.readBytes(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - senderPublicKey_ = input.readBytes(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - keyIndex_ = input.readUInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.session.libsignal.libsignal.protocol.SignalProtos.internal_static_textsecure_ClosedGroupCiphertextMessage_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.session.libsignal.libsignal.protocol.SignalProtos.internal_static_textsecure_ClosedGroupCiphertextMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.session.libsignal.libsignal.protocol.SignalProtos.ClosedGroupCiphertextMessage.class, org.session.libsignal.libsignal.protocol.SignalProtos.ClosedGroupCiphertextMessage.Builder.class); - } - - public static com.google.protobuf.Parser
optional bytes ciphertext = 1;
- *
- * - * @required - *- */ - public boolean hasCiphertext() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - *
optional bytes ciphertext = 1;
- *
- * - * @required - *- */ - public com.google.protobuf.ByteString getCiphertext() { - return ciphertext_; - } - - // optional bytes senderPublicKey = 2; - public static final int SENDERPUBLICKEY_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString senderPublicKey_; - /** - *
optional bytes senderPublicKey = 2;
- *
- * - * @required - *- */ - public boolean hasSenderPublicKey() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - *
optional bytes senderPublicKey = 2;
- *
- * - * @required - *- */ - public com.google.protobuf.ByteString getSenderPublicKey() { - return senderPublicKey_; - } - - // optional uint32 keyIndex = 3; - public static final int KEYINDEX_FIELD_NUMBER = 3; - private int keyIndex_; - /** - *
optional uint32 keyIndex = 3;
- *
- * - * @required - *- */ - public boolean hasKeyIndex() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - *
optional uint32 keyIndex = 3;
- *
- * - * @required - *- */ - public int getKeyIndex() { - return keyIndex_; - } - - private void initFields() { - ciphertext_ = com.google.protobuf.ByteString.EMPTY; - senderPublicKey_ = com.google.protobuf.ByteString.EMPTY; - keyIndex_ = 0; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, ciphertext_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, senderPublicKey_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeUInt32(3, keyIndex_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, ciphertext_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, senderPublicKey_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(3, keyIndex_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.session.libsignal.libsignal.protocol.SignalProtos.ClosedGroupCiphertextMessage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.session.libsignal.libsignal.protocol.SignalProtos.ClosedGroupCiphertextMessage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.session.libsignal.libsignal.protocol.SignalProtos.ClosedGroupCiphertextMessage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.session.libsignal.libsignal.protocol.SignalProtos.ClosedGroupCiphertextMessage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.session.libsignal.libsignal.protocol.SignalProtos.ClosedGroupCiphertextMessage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.session.libsignal.libsignal.protocol.SignalProtos.ClosedGroupCiphertextMessage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.session.libsignal.libsignal.protocol.SignalProtos.ClosedGroupCiphertextMessage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.session.libsignal.libsignal.protocol.SignalProtos.ClosedGroupCiphertextMessage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.session.libsignal.libsignal.protocol.SignalProtos.ClosedGroupCiphertextMessage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.session.libsignal.libsignal.protocol.SignalProtos.ClosedGroupCiphertextMessage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.session.libsignal.libsignal.protocol.SignalProtos.ClosedGroupCiphertextMessage prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code textsecure.ClosedGroupCiphertextMessage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder
optional bytes ciphertext = 1;
- *
- * - * @required - *- */ - public boolean hasCiphertext() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - *
optional bytes ciphertext = 1;
- *
- * - * @required - *- */ - public com.google.protobuf.ByteString getCiphertext() { - return ciphertext_; - } - /** - *
optional bytes ciphertext = 1;
- *
- * - * @required - *- */ - public Builder setCiphertext(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - ciphertext_ = value; - onChanged(); - return this; - } - /** - *
optional bytes ciphertext = 1;
- *
- * - * @required - *- */ - public Builder clearCiphertext() { - bitField0_ = (bitField0_ & ~0x00000001); - ciphertext_ = getDefaultInstance().getCiphertext(); - onChanged(); - return this; - } - - // optional bytes senderPublicKey = 2; - private com.google.protobuf.ByteString senderPublicKey_ = com.google.protobuf.ByteString.EMPTY; - /** - *
optional bytes senderPublicKey = 2;
- *
- * - * @required - *- */ - public boolean hasSenderPublicKey() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - *
optional bytes senderPublicKey = 2;
- *
- * - * @required - *- */ - public com.google.protobuf.ByteString getSenderPublicKey() { - return senderPublicKey_; - } - /** - *
optional bytes senderPublicKey = 2;
- *
- * - * @required - *- */ - public Builder setSenderPublicKey(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - senderPublicKey_ = value; - onChanged(); - return this; - } - /** - *
optional bytes senderPublicKey = 2;
- *
- * - * @required - *- */ - public Builder clearSenderPublicKey() { - bitField0_ = (bitField0_ & ~0x00000002); - senderPublicKey_ = getDefaultInstance().getSenderPublicKey(); - onChanged(); - return this; - } - - // optional uint32 keyIndex = 3; - private int keyIndex_ ; - /** - *
optional uint32 keyIndex = 3;
- *
- * - * @required - *- */ - public boolean hasKeyIndex() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - *
optional uint32 keyIndex = 3;
- *
- * - * @required - *- */ - public int getKeyIndex() { - return keyIndex_; - } - /** - *
optional uint32 keyIndex = 3;
- *
- * - * @required - *- */ - public Builder setKeyIndex(int value) { - bitField0_ |= 0x00000004; - keyIndex_ = value; - onChanged(); - return this; - } - /** - *
optional uint32 keyIndex = 3;
- *
- * - * @required - *- */ - public Builder clearKeyIndex() { - bitField0_ = (bitField0_ & ~0x00000004); - keyIndex_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:textsecure.ClosedGroupCiphertextMessage) - } - - static { - defaultInstance = new ClosedGroupCiphertextMessage(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:textsecure.ClosedGroupCiphertextMessage) - } - - private static com.google.protobuf.Descriptors.Descriptor - internal_static_textsecure_SignalMessage_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_textsecure_SignalMessage_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_textsecure_PreKeySignalMessage_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_textsecure_PreKeySignalMessage_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_textsecure_KeyExchangeMessage_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_textsecure_KeyExchangeMessage_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_textsecure_SenderKeyMessage_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_textsecure_SenderKeyMessage_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_textsecure_SenderKeyDistributionMessage_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_textsecure_SenderKeyDistributionMessage_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_textsecure_DeviceConsistencyCodeMessage_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_textsecure_DeviceConsistencyCodeMessage_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_textsecure_ClosedGroupCiphertextMessage_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_textsecure_ClosedGroupCiphertextMessage_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\031WhisperTextProtocol.proto\022\ntextsecure\"" + - "a\n\rSignalMessage\022\022\n\nratchetKey\030\001 \001(\014\022\017\n\007" + - "counter\030\002 \001(\r\022\027\n\017previousCounter\030\003 \001(\r\022\022" + - "\n\nciphertext\030\004 \001(\014\"\216\001\n\023PreKeySignalMessa" + - "ge\022\026\n\016registrationId\030\005 \001(\r\022\020\n\010preKeyId\030\001" + - " \001(\r\022\026\n\016signedPreKeyId\030\006 \001(\r\022\017\n\007baseKey\030" + - "\002 \001(\014\022\023\n\013identityKey\030\003 \001(\014\022\017\n\007message\030\004 " + - "\001(\014\"t\n\022KeyExchangeMessage\022\n\n\002id\030\001 \001(\r\022\017\n" + - "\007baseKey\030\002 \001(\014\022\022\n\nratchetKey\030\003 \001(\014\022\023\n\013id" + - "entityKey\030\004 \001(\014\022\030\n\020baseKeySignature\030\005 \001(", - "\014\"E\n\020SenderKeyMessage\022\n\n\002id\030\001 \001(\r\022\021\n\tite" + - "ration\030\002 \001(\r\022\022\n\nciphertext\030\003 \001(\014\"c\n\034Send" + - "erKeyDistributionMessage\022\n\n\002id\030\001 \001(\r\022\021\n\t" + - "iteration\030\002 \001(\r\022\020\n\010chainKey\030\003 \001(\014\022\022\n\nsig" + - "ningKey\030\004 \001(\014\"E\n\034DeviceConsistencyCodeMe" + - "ssage\022\022\n\ngeneration\030\001 \001(\r\022\021\n\tsignature\030\002" + - " \001(\014\"]\n\034ClosedGroupCiphertextMessage\022\022\n\n" + - "ciphertext\030\001 \001(\014\022\027\n\017senderPublicKey\030\002 \001(" + - "\014\022\020\n\010keyIndex\030\003 \001(\rB8\n(org.session.libsi" + - "gnal.libsignal.protocolB\014SignalProtos" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - internal_static_textsecure_SignalMessage_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_textsecure_SignalMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_textsecure_SignalMessage_descriptor, - new java.lang.String[] { "RatchetKey", "Counter", "PreviousCounter", "Ciphertext", }); - internal_static_textsecure_PreKeySignalMessage_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_textsecure_PreKeySignalMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_textsecure_PreKeySignalMessage_descriptor, - new java.lang.String[] { "RegistrationId", "PreKeyId", "SignedPreKeyId", "BaseKey", "IdentityKey", "Message", }); - internal_static_textsecure_KeyExchangeMessage_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_textsecure_KeyExchangeMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_textsecure_KeyExchangeMessage_descriptor, - new java.lang.String[] { "Id", "BaseKey", "RatchetKey", "IdentityKey", "BaseKeySignature", }); - internal_static_textsecure_SenderKeyMessage_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_textsecure_SenderKeyMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_textsecure_SenderKeyMessage_descriptor, - new java.lang.String[] { "Id", "Iteration", "Ciphertext", }); - internal_static_textsecure_SenderKeyDistributionMessage_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_textsecure_SenderKeyDistributionMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_textsecure_SenderKeyDistributionMessage_descriptor, - new java.lang.String[] { "Id", "Iteration", "ChainKey", "SigningKey", }); - internal_static_textsecure_DeviceConsistencyCodeMessage_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_textsecure_DeviceConsistencyCodeMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_textsecure_DeviceConsistencyCodeMessage_descriptor, - new java.lang.String[] { "Generation", "Signature", }); - internal_static_textsecure_ClosedGroupCiphertextMessage_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_textsecure_ClosedGroupCiphertextMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_textsecure_ClosedGroupCiphertextMessage_descriptor, - new java.lang.String[] { "Ciphertext", "SenderPublicKey", "KeyIndex", }); - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/state/IdentityKeyStore.java b/libsignal/src/main/java/org/session/libsignal/libsignal/state/IdentityKeyStore.java index 389cb8be6f..4cc30bfc6b 100644 --- a/libsignal/src/main/java/org/session/libsignal/libsignal/state/IdentityKeyStore.java +++ b/libsignal/src/main/java/org/session/libsignal/libsignal/state/IdentityKeyStore.java @@ -5,9 +5,7 @@ */ package org.session.libsignal.libsignal.state; -import org.session.libsignal.libsignal.IdentityKey; import org.session.libsignal.libsignal.IdentityKeyPair; -import org.session.libsignal.libsignal.SignalProtocolAddress; /** * Provides an interface to identity information. @@ -15,11 +13,6 @@ import org.session.libsignal.libsignal.SignalProtocolAddress; * @author Moxie Marlinspike */ public interface IdentityKeyStore { - - public enum Direction { - SENDING, RECEIVING - } - /** * Get the local client's identity key pair. * diff --git a/libsignal/src/main/java/org/session/libsignal/metadata/InvalidMetadataVersionException.java b/libsignal/src/main/java/org/session/libsignal/metadata/InvalidMetadataVersionException.java deleted file mode 100644 index 39054f60ad..0000000000 --- a/libsignal/src/main/java/org/session/libsignal/metadata/InvalidMetadataVersionException.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.session.libsignal.metadata; - - -public class InvalidMetadataVersionException extends Exception { - public InvalidMetadataVersionException(String s) { - super(s); - } -} diff --git a/libsignal/src/main/java/org/session/libsignal/metadata/ProtocolDuplicateMessageException.java b/libsignal/src/main/java/org/session/libsignal/metadata/ProtocolDuplicateMessageException.java deleted file mode 100644 index c3078d587e..0000000000 --- a/libsignal/src/main/java/org/session/libsignal/metadata/ProtocolDuplicateMessageException.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.session.libsignal.metadata; - - -public class ProtocolDuplicateMessageException extends ProtocolException { - public ProtocolDuplicateMessageException(Exception e, String sender, int senderDevice) { - super(e, sender, senderDevice); - } -} diff --git a/libsignal/src/main/java/org/session/libsignal/metadata/ProtocolInvalidKeyException.java b/libsignal/src/main/java/org/session/libsignal/metadata/ProtocolInvalidKeyException.java deleted file mode 100644 index 3a7c0af20b..0000000000 --- a/libsignal/src/main/java/org/session/libsignal/metadata/ProtocolInvalidKeyException.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.session.libsignal.metadata; - - -import org.session.libsignal.libsignal.InvalidKeyException; - -public class ProtocolInvalidKeyException extends ProtocolException { - public ProtocolInvalidKeyException(InvalidKeyException e, String sender, int senderDevice) { - super(e, sender, senderDevice); - } -} diff --git a/libsignal/src/main/java/org/session/libsignal/metadata/ProtocolInvalidKeyIdException.java b/libsignal/src/main/java/org/session/libsignal/metadata/ProtocolInvalidKeyIdException.java deleted file mode 100644 index 81d035b556..0000000000 --- a/libsignal/src/main/java/org/session/libsignal/metadata/ProtocolInvalidKeyIdException.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.session.libsignal.metadata; - - -public class ProtocolInvalidKeyIdException extends ProtocolException { - public ProtocolInvalidKeyIdException(Exception e, String sender, int senderDevice) { - super(e, sender, senderDevice); - } -} diff --git a/libsignal/src/main/java/org/session/libsignal/metadata/ProtocolInvalidVersionException.java b/libsignal/src/main/java/org/session/libsignal/metadata/ProtocolInvalidVersionException.java deleted file mode 100644 index 9d0d5161d5..0000000000 --- a/libsignal/src/main/java/org/session/libsignal/metadata/ProtocolInvalidVersionException.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.session.libsignal.metadata; - - -import org.session.libsignal.libsignal.InvalidVersionException; - -public class ProtocolInvalidVersionException extends ProtocolException { - public ProtocolInvalidVersionException(InvalidVersionException e, String sender, int senderDevice) { - super(e, sender, senderDevice); - } -} diff --git a/libsignal/src/main/java/org/session/libsignal/metadata/ProtocolLegacyMessageException.java b/libsignal/src/main/java/org/session/libsignal/metadata/ProtocolLegacyMessageException.java deleted file mode 100644 index 5f52bb5fa6..0000000000 --- a/libsignal/src/main/java/org/session/libsignal/metadata/ProtocolLegacyMessageException.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.session.libsignal.metadata; - - -import org.session.libsignal.libsignal.LegacyMessageException; - -public class ProtocolLegacyMessageException extends ProtocolException { - public ProtocolLegacyMessageException(LegacyMessageException e, String sender, int senderDeviceId) { - super(e, sender, senderDeviceId); - } -} diff --git a/libsignal/src/main/java/org/session/libsignal/metadata/ProtocolNoSessionException.java b/libsignal/src/main/java/org/session/libsignal/metadata/ProtocolNoSessionException.java deleted file mode 100644 index b290c4d642..0000000000 --- a/libsignal/src/main/java/org/session/libsignal/metadata/ProtocolNoSessionException.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.session.libsignal.metadata; - - -import org.session.libsignal.libsignal.NoSessionException; - -public class ProtocolNoSessionException extends ProtocolException { - public ProtocolNoSessionException(NoSessionException e, String sender, int senderDevice) { - super(e, sender, senderDevice); - } -} diff --git a/libsignal/src/main/java/org/session/libsignal/metadata/ProtocolUntrustedIdentityException.java b/libsignal/src/main/java/org/session/libsignal/metadata/ProtocolUntrustedIdentityException.java deleted file mode 100644 index c68c069318..0000000000 --- a/libsignal/src/main/java/org/session/libsignal/metadata/ProtocolUntrustedIdentityException.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.session.libsignal.metadata; - - -import org.session.libsignal.libsignal.UntrustedIdentityException; - -public class ProtocolUntrustedIdentityException extends ProtocolException { - public ProtocolUntrustedIdentityException(UntrustedIdentityException e, String sender, int senderDevice) { - super(e, sender, senderDevice); - } -} diff --git a/libsignal/src/main/java/org/session/libsignal/metadata/SelfSendException.java b/libsignal/src/main/java/org/session/libsignal/metadata/SelfSendException.java deleted file mode 100644 index ff6afe2071..0000000000 --- a/libsignal/src/main/java/org/session/libsignal/metadata/SelfSendException.java +++ /dev/null @@ -1,3 +0,0 @@ -package org.session.libsignal.metadata; - -public class SelfSendException extends Exception { } diff --git a/libsignal/src/main/java/org/session/libsignal/service/api/SignalServiceMessageSender.java b/libsignal/src/main/java/org/session/libsignal/service/api/SignalServiceMessageSender.java index 01cf302c87..e3ba867dac 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/api/SignalServiceMessageSender.java +++ b/libsignal/src/main/java/org/session/libsignal/service/api/SignalServiceMessageSender.java @@ -220,17 +220,8 @@ public class SignalServiceMessageSender { byte[] content = createMessageContent(message, recipients.get(0)); long timestamp = message.getTimestamp(); boolean isClosedGroup = message.group.isPresent() && message.group.get().getGroupType() == SignalServiceGroup.GroupType.SIGNAL; - List