Expand description
Restore codes: single-string encoding of everything needed to restore a library from cloud.
A restore code encodes the library ID, encryption key, cloud provider details, and credentials into a single base64url string prefixed with “bae:”.
The code contains secrets (encryption key, S3 credentials). OAuth tokens are NOT included because they expire – the user re-authenticates on restore.
Structs§
- Restore
Code - Everything needed to restore a library from cloud storage.
- Restore
Code Info - UI-ready info from a decoded restore code.
Enums§
- Restore
Code Error - Restore
Provider - Cloud provider details. Each variant carries only the fields needed for that provider. OAuth tokens are NOT stored (they expire); the user re-authenticates during restore.
Functions§
- decode_
restore_ code - Decode a restore code string back into a
RestoreCode. - decode_
restore_ code_ info - Decode a restore code and return UI-ready info.
- encode_
restore_ code - Encode a
RestoreCodeinto a prefixed base64url string. - provider_
needs_ oauth - Returns true if this provider requires an OAuth flow before restore.