Remove dead code and fix inspection issues

This commit is contained in:
AsamK 2021-12-05 10:25:46 +01:00
parent 6ffeb7c431
commit e83f43065e
13 changed files with 10 additions and 82 deletions

View file

@ -55,10 +55,6 @@ public class ServiceConfig {
}
}
public static AccountAttributes.Capabilities getCapabilities() {
return capabilities;
}
public static KeyStore getIasKeyStore() {
return iasKeyStore;
}

View file

@ -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()))

View file

@ -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) {

View file

@ -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;

View file

@ -41,8 +41,4 @@ public class IdentityInfo {
public Date getDateAdded() {
return this.added;
}
public byte[] getFingerprint() {
return identityKey.getPublicKey().serialize();
}
}

View file

@ -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));