mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 11:00:38 +00:00
Move group classes to separate package
This commit is contained in:
parent
22f19c4067
commit
9e6a353427
32 changed files with 69 additions and 59 deletions
|
@ -1,5 +1,6 @@
|
|||
package org.asamk.signal.manager;
|
||||
|
||||
import org.asamk.signal.manager.groups.GroupIdV1;
|
||||
import org.whispersystems.signalservice.api.push.SignalServiceAddress;
|
||||
|
||||
import java.util.Objects;
|
||||
|
|
|
@ -5,7 +5,7 @@ import org.signal.zkgroup.InvalidInputException;
|
|||
import org.signal.zkgroup.profiles.ProfileKey;
|
||||
import org.whispersystems.util.Base64;
|
||||
|
||||
class KeyUtils {
|
||||
public class KeyUtils {
|
||||
|
||||
private KeyUtils() {
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ class KeyUtils {
|
|||
return Base64.encodeBytes(secret);
|
||||
}
|
||||
|
||||
static byte[] getSecretBytes(int size) {
|
||||
public static byte[] getSecretBytes(int size) {
|
||||
byte[] secret = new byte[size];
|
||||
RandomUtils.getSecureRandom().nextBytes(secret);
|
||||
return secret;
|
||||
|
|
|
@ -18,6 +18,13 @@ package org.asamk.signal.manager;
|
|||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
import org.asamk.signal.manager.groups.GroupId;
|
||||
import org.asamk.signal.manager.groups.GroupIdV1;
|
||||
import org.asamk.signal.manager.groups.GroupIdV2;
|
||||
import org.asamk.signal.manager.groups.GroupInviteLinkUrl;
|
||||
import org.asamk.signal.manager.groups.GroupNotFoundException;
|
||||
import org.asamk.signal.manager.groups.GroupUtils;
|
||||
import org.asamk.signal.manager.groups.NotAGroupMemberException;
|
||||
import org.asamk.signal.manager.helper.GroupHelper;
|
||||
import org.asamk.signal.manager.helper.ProfileHelper;
|
||||
import org.asamk.signal.manager.helper.UnidentifiedAccessHelper;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package org.asamk.signal.manager;
|
||||
package org.asamk.signal.manager.groups;
|
||||
|
||||
import org.whispersystems.util.Base64;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.asamk.signal.manager;
|
||||
package org.asamk.signal.manager.groups;
|
||||
|
||||
public class GroupIdFormatException extends Exception {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.asamk.signal.manager;
|
||||
package org.asamk.signal.manager.groups;
|
||||
|
||||
import static org.asamk.signal.manager.KeyUtils.getSecretBytes;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.asamk.signal.manager;
|
||||
package org.asamk.signal.manager.groups;
|
||||
|
||||
import java.util.Base64;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.asamk.signal.manager;
|
||||
package org.asamk.signal.manager.groups;
|
||||
|
||||
import com.google.protobuf.ByteString;
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
package org.asamk.signal.manager;
|
||||
package org.asamk.signal.manager.groups;
|
||||
|
||||
import org.asamk.signal.manager.KeyUtils;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.asamk.signal.manager;
|
||||
package org.asamk.signal.manager.groups;
|
||||
|
||||
public class GroupNotFoundException extends Exception {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.asamk.signal.manager;
|
||||
package org.asamk.signal.manager.groups;
|
||||
|
||||
import org.asamk.signal.storage.groups.GroupInfo;
|
||||
import org.asamk.signal.storage.groups.GroupInfoV1;
|
|
@ -1,4 +1,4 @@
|
|||
package org.asamk.signal.manager;
|
||||
package org.asamk.signal.manager.groups;
|
||||
|
||||
public class NotAGroupMemberException extends Exception {
|
||||
|
|
@ -2,9 +2,9 @@ package org.asamk.signal.manager.helper;
|
|||
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
|
||||
import org.asamk.signal.manager.GroupIdV2;
|
||||
import org.asamk.signal.manager.GroupLinkPassword;
|
||||
import org.asamk.signal.manager.GroupUtils;
|
||||
import org.asamk.signal.manager.groups.GroupIdV2;
|
||||
import org.asamk.signal.manager.groups.GroupLinkPassword;
|
||||
import org.asamk.signal.manager.groups.GroupUtils;
|
||||
import org.asamk.signal.storage.groups.GroupInfoV2;
|
||||
import org.asamk.signal.storage.profiles.SignalProfile;
|
||||
import org.asamk.signal.util.IOUtils;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue