]> nmode's Git Repositories - signal-cli/blobdiff - lib/src/main/java/org/asamk/signal/manager/groups/GroupUtils.java
Update libsignal-service
[signal-cli] / lib / src / main / java / org / asamk / signal / manager / groups / GroupUtils.java
index c1db77bfd25ae4e1b6ad162e74efd20c89d23d11..76352d1ad984d826c990b44c16ffecfe1fef2be2 100644 (file)
@@ -1,12 +1,15 @@
 package org.asamk.signal.manager.groups;
 
+import org.asamk.signal.manager.api.GroupId;
+import org.asamk.signal.manager.api.GroupIdV1;
+import org.asamk.signal.manager.api.GroupIdV2;
 import org.asamk.signal.manager.storage.groups.GroupInfo;
 import org.asamk.signal.manager.storage.groups.GroupInfoV1;
 import org.asamk.signal.manager.storage.groups.GroupInfoV2;
-import org.signal.zkgroup.InvalidInputException;
-import org.signal.zkgroup.groups.GroupMasterKey;
-import org.signal.zkgroup.groups.GroupSecretParams;
-import org.whispersystems.libsignal.kdf.HKDFv3;
+import org.signal.libsignal.protocol.kdf.HKDF;
+import org.signal.libsignal.zkgroup.InvalidInputException;
+import org.signal.libsignal.zkgroup.groups.GroupMasterKey;
+import org.signal.libsignal.zkgroup.groups.GroupSecretParams;
 import org.whispersystems.signalservice.api.messages.SignalServiceDataMessage;
 import org.whispersystems.signalservice.api.messages.SignalServiceGroup;
 import org.whispersystems.signalservice.api.messages.SignalServiceGroupContext;
@@ -25,7 +28,7 @@ public class GroupUtils {
         } else {
             final var groupInfoV2 = (GroupInfoV2) groupInfo;
             var group = SignalServiceGroupV2.newBuilder(groupInfoV2.getMasterKey())
-                    .withRevision(groupInfoV2.getGroup() == null ? 0 : groupInfoV2.getGroup().getRevision())
+                    .withRevision(groupInfoV2.getGroup() == null ? 0 : groupInfoV2.getGroup().revision)
                     .build();
             messageBuilder.asGroupMessage(group);
         }
@@ -57,7 +60,7 @@ public class GroupUtils {
 
     private static GroupMasterKey deriveV2MigrationMasterKey(GroupIdV1 groupIdV1) {
         try {
-            return new GroupMasterKey(new HKDFv3().deriveSecrets(groupIdV1.serialize(),
+            return new GroupMasterKey(HKDF.deriveSecrets(groupIdV1.serialize(),
                     "GV2 Migration".getBytes(),
                     GroupMasterKey.SIZE));
         } catch (InvalidInputException e) {