verifyBackup

suspend fun verifyBackup(keyId: String, backupData: ByteArray, rsaPublicKey: ByteArray, label: String = ""): Result<Boolean>

Verifies a signed backup against the signer's RSA public key.

Confirms the backup was produced by the expected service and has not been altered. Verify before importing untrusted backup data.

Return

true if the backup is authentic, false otherwise.

Parameters

keyId

the hex-encoded keyId the backup belongs to; the SDK reads the share from its StorageClient.

backupData

the backup bytes to verify.

rsaPublicKey

the RSA public key of the backup signer.

label

optional context label bound into the verification; must match the label used when the backup was created.

See also

to create a backup.

to restore from a backup.