Companion
Functions
Link copied to clipboard
Creates a store isolated by both serviceName and accountName using default KeychainOptions. See the three-argument overload for details.
fun forCurrentPlatform(serviceName: String, accountName: String, options: KeychainOptions): CredentialKeychain
Creates a store isolated by both serviceName and accountName — two calls with different values for either parameter address disjoint sets of entries, so one process can keep separate stores per app, environment, or signed-in user.
Link copied to clipboard
fun CredentialKeychain.Companion.forCurrentPlatform(context: Context, serviceName: String, accountName: String = serviceName): CredentialKeychain
Creates app-private storage isolated by serviceName and accountName, encrypted with a non-exportable Android Keystore AES-256-GCM key. Ciphertext is written to a file under Context.getNoBackupFilesDir, so entries are excluded from Auto Backup — Keystore keys are hardware/OS-bound and cannot be restored onto another device or after a factory reset.