KeyBlobStore

interface KeyBlobStore

Abstraction for persisting armored PGP key ring blobs outside the Room database.

Implementations are responsible for encryption at rest, path naming, and secure deletion. The database stores metadata and blob paths; actual key material lives in the blob store.

Inheritors

Functions

Link copied to clipboard
abstract fun delete(path: String)

Removes the blob at path, including any secure-wipe steps the implementation supports.

Link copied to clipboard
abstract fun read(path: String): ByteArray

Loads and decrypts key ring bytes from path.

Link copied to clipboard
abstract fun write(keyId: Long, data: ByteArray): String

Persists secret key ring bytes for keyId.

Link copied to clipboard
abstract fun writePublic(keyId: Long, data: ByteArray): String

Persists public key ring bytes for keyId, typically alongside a secret blob.