Package-level declarations

Types

Link copied to clipboard

Helper for checking biometric availability and showing the platform BiometricPrompt.

Link copied to clipboard
sealed class BiometricAuthResult

Outcome of a BiometricAuthenticator prompt.

Link copied to clipboard

Biometric hardware and enrollment status on the current device.

Link copied to clipboard

Qualitative strength rating for a numeric PIN.

Link copied to clipboard

Evaluates numeric PIN strength without storing or logging the PIN.

Link copied to clipboard
data class PinValidationResult(val isValid: Boolean, val strength: PinStrength, val reason: PinWeaknessReason? = null)

Outcome of validating a PIN against a minimum strength requirement.

Link copied to clipboard
sealed class PinWeaknessReason

Describes why a PIN is considered weak. Never includes the raw PIN value.

Functions

Link copied to clipboard
fun BiometricAuthButton(onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, availability: BiometricAvailability = BiometricAvailability.Available, useOutlinedStyle: Boolean = true, label: String = "Use biometrics")

Button that launches biometric authentication when tapped.

Link copied to clipboard
fun ConfirmPinScreen(originalPin: String, onPinConfirmed: () -> Unit, modifier: Modifier = Modifier, pinLength: Int = originalPin.length, title: String = "Confirm PIN", subtitle: String? = "Re-enter your PIN to confirm", secureScreen: Boolean = false, onPinMismatch: () -> Unit? = null, onCancel: () -> Unit? = null, headerContent: @Composable () -> Unit? = null)

Screen for confirming a previously created PIN.

Link copied to clipboard
fun CreatePinScreen(onPinCreated: (String) -> Unit, modifier: Modifier = Modifier, pinLength: Int = 6, minStrength: PinStrength = PinStrength.Medium, title: String = "Create PIN", subtitle: String? = "Choose a secure PIN to protect your account", secureScreen: Boolean = false, onCancel: () -> Unit? = null, headerContent: @Composable () -> Unit? = null)

Screen for creating a new PIN.

Link copied to clipboard
fun PinInput(value: String, onValueChange: (String) -> Unit, modifier: Modifier = Modifier, length: Int = 6, isError: Boolean = false, isSuccess: Boolean = false, enabled: Boolean = true, revealLastDigit: Boolean = false, colors: PinFlowColors = PinFlowDefaults.colors(), dimensions: PinFlowDimensions = PinFlowDefaults.dimensions(), hapticEnabled: Boolean = true, onComplete: (String) -> Unit? = null)

Secure PIN input built on PinFlow with masking enabled by default.

Link copied to clipboard
fun PinLockScreen(onPinEntered: (String) -> Unit, modifier: Modifier = Modifier, pinLength: Int = 6, title: String = "Enter PIN", subtitle: String? = "Unlock your app", isVerifying: Boolean = false, isError: Boolean = false, attemptsRemaining: Int? = null, biometricEnabled: Boolean = false, biometricPromptTitle: String = "Unlock", biometricPromptSubtitle: String? = null, secureScreen: Boolean = false, onBiometricSuccess: () -> Unit? = null, onBiometricError: (BiometricAuthResult) -> Unit? = null, onForgotPin: () -> Unit? = null, onCancel: () -> Unit? = null, headerContent: @Composable () -> Unit? = null)

Reusable app lock screen for PIN entry.

Link copied to clipboard
fun PinSetupScreen(onPinSetupComplete: (String) -> Unit, modifier: Modifier = Modifier, pinLength: Int = 6, minStrength: PinStrength = PinStrength.Medium, createTitle: String = "Create PIN", createSubtitle: String? = "Choose a secure PIN to protect your account", confirmTitle: String = "Confirm PIN", confirmSubtitle: String? = "Re-enter your PIN to confirm", secureScreen: Boolean = false, onCancel: () -> Unit? = null)

Combined create-and-confirm PIN setup flow.

Link copied to clipboard

Applies WindowManager.LayoutParams.FLAG_SECURE while enabled is true, preventing screenshots and screen recording for the host window. Restores the previous flag on dispose.