Package-level declarations

Types

Link copied to clipboard
interface AlgorithmProvider<T>
Link copied to clipboard
Link copied to clipboard
interface Cipher
Link copied to clipboard
class CryptoRuntime(stack: PlatformCryptoStack, storeRegistry: StoreRegistry = StoreRegistry(), log: KryptoLog = KryptoLog.NoOp)

Initializes platform crypto (key rotation + re-encrypt + post-init hooks) behind a mutex.

Link copied to clipboard
sealed interface CryptoRuntimeState
Link copied to clipboard
fun interface EncryptedStoreHandle

Handle for an encrypted store that can rewrite ciphertext under the current Cipher after key rotation (REQ-ROT-01).

Link copied to clipboard
data class KeyRotationConfig(val rotationPeriod: Duration = 90.days, val initialBackoff: Duration = 500.milliseconds, val maxRetries: Int = 3)
Link copied to clipboard
interface KeyRotator
Link copied to clipboard
fun interface KryptoLog

Optional logging hook for KryptoStore. Default is a no-op so the library has no hard dependency on app logging frameworks.

Link copied to clipboard
data class PlatformCryptoStack(val cipher: Cipher, val keyRotator: KeyRotator, val postRotationInit: suspend () -> Unit = {}, val postMigrationCleanup: suspend () -> Unit = {})
Link copied to clipboard

Registry of encrypted stores to re-encrypt when KeyRotator.rotateKeyIfNeeded returns true.

Link copied to clipboard
class StreamingAeadCipher(streamingAead: StreamingAead, dispatcher: ERROR CLASS: Symbol not found for CoroutineDispatcher = Dispatchers.Default) : Cipher

Optional Cipher backed by Tink StreamingAead for large payloads (REQ-HRD-03).

Properties

Link copied to clipboard

Magic header prepended to encrypted DataStore payloads (historical wire name; keep for blob compat).

Link copied to clipboard

IndexedDB database name used by the WebCrypto worker — keys must not be stored in localStorage.

Functions

Link copied to clipboard

Platform entry: Android needs AndroidCryptoContextHolder registration before use.

expect fun createPlatformCryptoStack(appId: String, rotationConfig: KeyRotationConfig = KeyRotationConfig.DEFAULT): PlatformCryptoStack

Platform entry: Android needs AndroidCryptoContextHolder registration before use.

Platform entry: Android needs AndroidCryptoContextHolder registration before use.

Platform entry: Android needs AndroidCryptoContextHolder registration before use.

Link copied to clipboard
fun createStreamingAeadCipher(dispatcher: ERROR CLASS: Symbol not found for CoroutineDispatcher = Dispatchers.Default): StreamingAeadCipher

Creates a standalone StreamingAeadCipher with AES256_GCM_HKDF_1MB (REQ-HRD-03).