backup

suspend fun backup(activity: Activity, appMetadata: ByteArray? = null)

Encrypts appMetadata and writes the blob to storage.

Passing null (or an empty array) is allowed — the blob then contains a zero-length payload. That's a useful "user has a sigil but no app state to back up" signal, e.g. for a wallet- only app that wants the backup-exists indicator without shipping any per-app state.

Throws

if passkey auth fails

if PRF is not available or storage fails