mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-26 20:55:10 +00:00
Migrate calls to deprecated libsignal methods.
This commit is contained in:
committed by
Michelle Tang
parent
d65954c26f
commit
8b9fc30b97
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user