Search in sources :

Example 1 with BackupResponse

use of org.whispersystems.signalservice.internal.keybackup.protos.BackupResponse in project Signal-Android by signalapp.

the class KeyBackupCipher method getKeyBackupResponse.

public static BackupResponse getKeyBackupResponse(KeyBackupResponse response, RemoteAttestation remoteAttestation) throws InvalidCiphertextException, InvalidProtocolBufferException {
    byte[] data = decryptData(response, remoteAttestation);
    Response backupResponse = Response.parseFrom(data);
    return backupResponse.getBackup();
}
Also used : KeyBackupResponse(org.whispersystems.signalservice.internal.contacts.entities.KeyBackupResponse) TokenResponse(org.whispersystems.signalservice.internal.contacts.entities.TokenResponse) RestoreResponse(org.whispersystems.signalservice.internal.keybackup.protos.RestoreResponse) BackupResponse(org.whispersystems.signalservice.internal.keybackup.protos.BackupResponse) Response(org.whispersystems.signalservice.internal.keybackup.protos.Response) DeleteResponse(org.whispersystems.signalservice.internal.keybackup.protos.DeleteResponse)

Example 2 with BackupResponse

use of org.whispersystems.signalservice.internal.keybackup.protos.BackupResponse in project Signal-Android by WhisperSystems.

the class KeyBackupCipher method getKeyBackupResponse.

public static BackupResponse getKeyBackupResponse(KeyBackupResponse response, RemoteAttestation remoteAttestation) throws InvalidCiphertextException, InvalidProtocolBufferException {
    byte[] data = decryptData(response, remoteAttestation);
    Response backupResponse = Response.parseFrom(data);
    return backupResponse.getBackup();
}
Also used : KeyBackupResponse(org.whispersystems.signalservice.internal.contacts.entities.KeyBackupResponse) TokenResponse(org.whispersystems.signalservice.internal.contacts.entities.TokenResponse) RestoreResponse(org.whispersystems.signalservice.internal.keybackup.protos.RestoreResponse) BackupResponse(org.whispersystems.signalservice.internal.keybackup.protos.BackupResponse) Response(org.whispersystems.signalservice.internal.keybackup.protos.Response) DeleteResponse(org.whispersystems.signalservice.internal.keybackup.protos.DeleteResponse)

Aggregations

KeyBackupResponse (org.whispersystems.signalservice.internal.contacts.entities.KeyBackupResponse)2 TokenResponse (org.whispersystems.signalservice.internal.contacts.entities.TokenResponse)2 BackupResponse (org.whispersystems.signalservice.internal.keybackup.protos.BackupResponse)2 DeleteResponse (org.whispersystems.signalservice.internal.keybackup.protos.DeleteResponse)2 Response (org.whispersystems.signalservice.internal.keybackup.protos.Response)2 RestoreResponse (org.whispersystems.signalservice.internal.keybackup.protos.RestoreResponse)2