mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-02 00:17:41 +01:00
Fix local backup restore AEP handling and conditional re-enable.
This commit is contained in:
committed by
Cody Henthorne
parent
c7a6c7ad9e
commit
78d3db319c
@@ -34,7 +34,14 @@ class MessageBackupKey(override val value: ByteArray) : BackupKey {
|
||||
* @param forwardSecrecyToken Should be present for any backup located on the archive CDN. Absent for other uses (i.e. link+sync).
|
||||
*/
|
||||
fun deriveBackupSecrets(aci: ServiceId.ACI, forwardSecrecyToken: BackupForwardSecrecyToken?): BackupKeyMaterial {
|
||||
val backupId = deriveBackupId(aci)
|
||||
return deriveBackupSecrets(deriveBackupId(aci), forwardSecrecyToken)
|
||||
}
|
||||
|
||||
/**
|
||||
* Derives the cryptographic material used to encrypt a backup, using a [BackupId] directly
|
||||
* instead of deriving it from an ACI.
|
||||
*/
|
||||
fun deriveBackupSecrets(backupId: BackupId, forwardSecrecyToken: BackupForwardSecrecyToken?): BackupKeyMaterial {
|
||||
val libsignalBackupKey = LibSignalBackupKey(value)
|
||||
val libsignalMessageMessageBackupKey = MessageBackupKey(libsignalBackupKey, backupId.value, forwardSecrecyToken)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user