aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/whispersystems/libaxolotl/protocol/SenderKeyDistributionMessage.java
diff options
context:
space:
mode:
authorMoxie Marlinspike <moxie@thoughtcrime.org>2015-01-08 13:48:49 -0800
committerMoxie Marlinspike <moxie@thoughtcrime.org>2015-01-08 14:09:01 -0800
commit6445ea5f13850f42c3952bd06a2369317683ed88 (patch)
treef2bb37c8cf4710ff6a6a37a3e7e702c5a21ca504 /src/main/java/org/whispersystems/libaxolotl/protocol/SenderKeyDistributionMessage.java
parenta4d8f7f6a4c4e9e89db35f299e558dceee2362a1 (diff)
Break project up into Java and Android build/test.
Diffstat (limited to 'src/main/java/org/whispersystems/libaxolotl/protocol/SenderKeyDistributionMessage.java')
-rw-r--r--src/main/java/org/whispersystems/libaxolotl/protocol/SenderKeyDistributionMessage.java56
1 files changed, 0 insertions, 56 deletions
diff --git a/src/main/java/org/whispersystems/libaxolotl/protocol/SenderKeyDistributionMessage.java b/src/main/java/org/whispersystems/libaxolotl/protocol/SenderKeyDistributionMessage.java
deleted file mode 100644
index 424dd87c..00000000
--- a/src/main/java/org/whispersystems/libaxolotl/protocol/SenderKeyDistributionMessage.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package org.whispersystems.libaxolotl.protocol;
-
-import com.google.protobuf.ByteString;
-
-import org.whispersystems.libaxolotl.ecc.ECPublicKey;
-import org.whispersystems.libaxolotl.util.ByteUtil;
-
-public class SenderKeyDistributionMessage implements CiphertextMessage {
-
- private final int id;
- private final int iteration;
- private final byte[] chainKey;
- private final ECPublicKey signatureKey;
- private final byte[] serialized;
-
- public SenderKeyDistributionMessage(int id, int iteration, byte[] chainKey, ECPublicKey signatureKey) {
- byte[] version = {ByteUtil.intsToByteHighAndLow(CURRENT_VERSION, CURRENT_VERSION)};
-
- this.id = id;
- this.iteration = iteration;
- this.chainKey = chainKey;
- this.signatureKey = signatureKey;
- this.serialized = WhisperProtos.SenderKeyDistributionMessage.newBuilder()
- .setId(id)
- .setIteration(iteration)
- .setChainKey(ByteString.copyFrom(chainKey))
- .setSigningKey(ByteString.copyFrom(signatureKey.serialize()))
- .build().toByteArray();
- }
-
- @Override
- public byte[] serialize() {
- return serialized;
- }
-
- @Override
- public int getType() {
- return SENDERKEY_DISTRIBUTION_TYPE;
- }
-
- public int getIteration() {
- return iteration;
- }
-
- public byte[] getChainKey() {
- return chainKey;
- }
-
- public ECPublicKey getSignatureKey() {
- return signatureKey;
- }
-
- public int getId() {
- return id;
- }
-}