Migrate calls to deprecated libsignal methods.

This commit is contained in:
Alex Bakon
2025-04-03 16:33:27 -04:00
committed by Michelle Tang
parent d65954c26f
commit 8b9fc30b97
4 changed files with 7 additions and 8 deletions

View File

@@ -5,7 +5,7 @@ import androidx.annotation.Nullable;
import org.signal.core.util.DatabaseId;
import org.signal.core.util.Hex;
import org.signal.libsignal.protocol.kdf.HKDFv3;
import org.signal.libsignal.protocol.kdf.HKDF;
import org.signal.libsignal.zkgroup.InvalidInputException;
import org.signal.libsignal.zkgroup.groups.GroupIdentifier;
import org.signal.libsignal.zkgroup.groups.GroupMasterKey;
@@ -299,7 +299,7 @@ public abstract class GroupId implements DatabaseId {
public GroupMasterKey deriveV2MigrationMasterKey() {
try {
return new GroupMasterKey(new HKDFv3().deriveSecrets(getDecodedId(), "GV2 Migration".getBytes(), GroupMasterKey.SIZE));
return new GroupMasterKey(HKDF.deriveSecrets(getDecodedId(), "GV2 Migration".getBytes(), GroupMasterKey.SIZE));
} catch (InvalidInputException e) {
throw new AssertionError(e);
}

View File

@@ -75,7 +75,7 @@ class UsernameShareBottomSheet : DSLSettingsBottomSheetFragment() {
customPref(
CopyButton.Model(
text = getString(R.string.signal_me_username_url, Base64.encodeUrlSafeWithoutPadding(Username.hash(username))),
text = getString(R.string.signal_me_username_url, Base64.encodeUrlSafeWithoutPadding(Username(username).hash)),
onClick = {
copyToClipboard(it)
}
@@ -86,7 +86,7 @@ class UsernameShareBottomSheet : DSLSettingsBottomSheetFragment() {
customPref(
ShareButton.Model(
text = getString(R.string.signal_me_username_url, Base64.encodeUrlSafeWithoutPadding(Username.hash(username))),
text = getString(R.string.signal_me_username_url, Base64.encodeUrlSafeWithoutPadding(Username(username).hash)),
onClick = {
openShareSheet(it.text)
}