Package-level declarations

Types

Link copied to clipboard

Helpers for persisting crypto results to the app cache and sharing them, plus heuristics for deriving output file names from an input name.

Link copied to clipboard

The selectable operation modes of the crypto screen.

Link copied to clipboard

The kind of payload being operated on in the crypto screen.

Link copied to clipboard
data class CryptoUiState(val payload: CryptoPayload = CryptoPayload.TEXT, val recipientKeyIds: Set<Long> = emptySet(), val secretKeyId: Long? = null, val plaintext: String = "", val ciphertext: String = "", val signedInput: String = "", val passphrase: String = "", val output: String = "", val verifyResult: VerifyUiResult? = null, val inputFileName: String? = null, val inputFileBytes: ByteArray? = null, val signatureFileName: String? = null, val signatureFileBytes: ByteArray? = null, val outputFileName: String? = null, val outputFileBytes: ByteArray? = null, val folderFiles: List<Pair<String, ByteArray>> = emptyList(), val fileStatus: String? = null, val error: String? = null, val isBusy: Boolean = false)

Immutable UI state for the crypto screen (inputs, outputs, status, flags).

Link copied to clipboard
class CryptoViewModel @Inject constructor(keyRepository: KeyRepository, cryptoOperations: CryptoOperations) : ViewModel

ViewModel backing the crypto screen.

Link copied to clipboard
data class VerifyUiResult(val valid: Boolean, val signerKeyId: Long?, val signerLabel: String?, val error: String?)

UI-facing outcome of a signature verification.

Functions

Link copied to clipboard
fun CryptoScreen(onBack: () -> Unit = {}, showBack: Boolean = true, viewModel: CryptoViewModel = hiltViewModel())

Top-level crypto screen composable.