mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 18:30:20 +01:00
Hmac-SIV encryption/decryption.
This commit is contained in:
committed by
Greyson Parrelli
parent
3907ec8b51
commit
7d70ea78cd
@@ -4,6 +4,7 @@ import androidx.annotation.Nullable;
|
||||
|
||||
import org.thoughtcrime.securesms.util.JsonUtils;
|
||||
import org.whispersystems.signalservice.api.RegistrationLockData;
|
||||
import org.whispersystems.signalservice.api.kbs.MasterKey;
|
||||
import org.whispersystems.signalservice.internal.contacts.entities.TokenResponse;
|
||||
import org.whispersystems.signalservice.internal.registrationpin.PinStretcher;
|
||||
|
||||
@@ -51,8 +52,13 @@ public final class KbsValues {
|
||||
editor.commit();
|
||||
}
|
||||
|
||||
public byte[] getMasterKey() {
|
||||
return store.getBlob(REGISTRATION_LOCK_MASTER_KEY, null);
|
||||
public @Nullable MasterKey getMasterKey() {
|
||||
byte[] blob = store.getBlob(REGISTRATION_LOCK_MASTER_KEY, null);
|
||||
if (blob != null) {
|
||||
return new MasterKey(blob);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public @Nullable String getRegistrationLockToken() {
|
||||
|
||||
Reference in New Issue
Block a user