KeyDetailViewModel

class KeyDetailViewModel @Inject constructor(keyRepository: KeyRepository) : ViewModel

androidx.lifecycle.ViewModel providing read-only detail and export access for a single key ring; all repository access happens on Dispatchers.IO.

Constructors

Link copied to clipboard
@Inject
constructor(keyRepository: KeyRepository)

Functions

Link copied to clipboard
open fun addCloseable(closeable: AutoCloseable)
fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard
suspend fun exportPublic(keyId: Long): ByteArray?

Returns the ASCII-armored public key for keyId, or null if missing.

Link copied to clipboard
suspend fun exportSecret(keyId: Long): ByteArray?

Returns the ASCII-armored secret key for keyId, or null if missing.

Link copied to clipboard
Link copied to clipboard
suspend fun loadDetail(keyId: Long): KeyDetail?

Loads the full KeyDetail for keyId, or null if not found.