CryptoViewModel
ViewModel backing the crypto screen.
Exposes an observable CryptoUiState and the live key list, and drives all encrypt/decrypt/sign/verify operations for text, file and folder payloads. Heavy work runs on background dispatchers; passphrase char arrays are wiped after each operation.
Functions
Clears any produced output file.
Decrypts the current text (or delegates to decryptFile for files).
Decrypts the selected encrypted file using the chosen secret key.
Encrypts the current payload according to the active CryptoPayload.
Encrypts the selected input file to the chosen recipients.
Packs the selected files into a tar archive and encrypts it.
Reacts to a mode change, downgrading FOLDER payloads for non-encrypt modes.
Selects the secret key used for decrypt/sign operations.
Updates the ciphertext input.
Sets the files for folder encryption, enforcing the total size limit.
Sets the selected input file, enforcing the maximum stream size.
Updates the passphrase input.
Switches the active payload type and clears any file/output state.
Updates the plaintext input.
Replaces the set of recipient key ids.
Sets the detached signature file used for verification.
Updates the signed-text input and resets any prior verification result.
Adds or removes keyId from the recipient set.
Verifies the signed text (or delegates to verifyFile for files).
Verifies a detached signature against the selected signed file.