forCurrentPlatform

fun forCurrentPlatform(serviceName: String, accountName: String): ProtectedKeychain(source)

Creates a store isolated by both serviceName and accountName. Entries never collide with CredentialKeychain entries that use the same names.

Android callers must use the overload that takes a Context; this overload returns a store that throws KeychainUnavailableException on Android.

Throws

if serviceName or accountName is blank or contains NUL, CR, or LF.