mirror of
https://github.com/aljazceru/signal-cli.git
synced 2026-01-30 11:04:21 +01:00
Remove dead code and fix inspection issues
This commit is contained in:
@@ -55,10 +55,6 @@ public class ServiceConfig {
|
||||
}
|
||||
}
|
||||
|
||||
public static AccountAttributes.Capabilities getCapabilities() {
|
||||
return capabilities;
|
||||
}
|
||||
|
||||
public static KeyStore getIasKeyStore() {
|
||||
return iasKeyStore;
|
||||
}
|
||||
|
||||
@@ -26,10 +26,6 @@ public final class GroupInviteLinkUrl {
|
||||
GroupLinkPassword.fromBytes(group.getInviteLinkPassword().toByteArray()));
|
||||
}
|
||||
|
||||
public static boolean isGroupLink(String urlString) {
|
||||
return getGroupUrl(urlString) != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return null iff not a group url.
|
||||
* @throws InvalidGroupLinkException If group url, but cannot be parsed.
|
||||
@@ -95,7 +91,7 @@ public final class GroupInviteLinkUrl {
|
||||
this.url = createUrl(groupMasterKey, password);
|
||||
}
|
||||
|
||||
protected static String createUrl(GroupMasterKey groupMasterKey, GroupLinkPassword password) {
|
||||
private static String createUrl(GroupMasterKey groupMasterKey, GroupLinkPassword password) {
|
||||
var groupInviteLink = GroupInviteLink.newBuilder()
|
||||
.setV1Contents(GroupInviteLink.GroupInviteLinkContentsV1.newBuilder()
|
||||
.setGroupMasterKey(ByteString.copyFrom(groupMasterKey.serialize()))
|
||||
|
||||
@@ -6,7 +6,7 @@ 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.whispersystems.libsignal.kdf.HKDF;
|
||||
import org.whispersystems.signalservice.api.messages.SignalServiceDataMessage;
|
||||
import org.whispersystems.signalservice.api.messages.SignalServiceGroup;
|
||||
import org.whispersystems.signalservice.api.messages.SignalServiceGroupContext;
|
||||
@@ -57,7 +57,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) {
|
||||
|
||||
@@ -890,10 +890,6 @@ public class SignalAccount implements Closeable {
|
||||
save();
|
||||
}
|
||||
|
||||
public String getRegistrationLockPin() {
|
||||
return registrationLockPin;
|
||||
}
|
||||
|
||||
public void setRegistrationLockPin(final String registrationLockPin, final MasterKey pinMasterKey) {
|
||||
this.registrationLockPin = registrationLockPin;
|
||||
this.pinMasterKey = pinMasterKey;
|
||||
|
||||
@@ -41,8 +41,4 @@ public class IdentityInfo {
|
||||
public Date getDateAdded() {
|
||||
return this.added;
|
||||
}
|
||||
|
||||
public byte[] getFingerprint() {
|
||||
return identityKey.getPublicKey().serialize();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,10 +68,6 @@ public class KeyUtils {
|
||||
return new SignedPreKeyRecord(signedPreKeyId, System.currentTimeMillis(), keyPair, signature);
|
||||
}
|
||||
|
||||
public static String createSignalingKey() {
|
||||
return getSecret(52);
|
||||
}
|
||||
|
||||
public static ProfileKey createProfileKey() {
|
||||
try {
|
||||
return new ProfileKey(getSecretBytes(32));
|
||||
|
||||
Reference in New Issue
Block a user