import typing

import android.os
import java
import java.lang
import java.security
import javax.crypto

class FingerprintManager(java.lang.Object):
    FINGERPRINT_ACQUIRED_GOOD: typing.ClassVar[int] = ...
    FINGERPRINT_ACQUIRED_IMAGER_DIRTY: typing.ClassVar[int] = ...
    FINGERPRINT_ACQUIRED_INSUFFICIENT: typing.ClassVar[int] = ...
    FINGERPRINT_ACQUIRED_PARTIAL: typing.ClassVar[int] = ...
    FINGERPRINT_ACQUIRED_TOO_FAST: typing.ClassVar[int] = ...
    FINGERPRINT_ACQUIRED_TOO_SLOW: typing.ClassVar[int] = ...
    FINGERPRINT_ERROR_CANCELED: typing.ClassVar[int] = ...
    FINGERPRINT_ERROR_HW_NOT_PRESENT: typing.ClassVar[int] = ...
    FINGERPRINT_ERROR_HW_UNAVAILABLE: typing.ClassVar[int] = ...
    FINGERPRINT_ERROR_LOCKOUT: typing.ClassVar[int] = ...
    FINGERPRINT_ERROR_LOCKOUT_PERMANENT: typing.ClassVar[int] = ...
    FINGERPRINT_ERROR_NO_FINGERPRINTS: typing.ClassVar[int] = ...
    FINGERPRINT_ERROR_NO_SPACE: typing.ClassVar[int] = ...
    FINGERPRINT_ERROR_TIMEOUT: typing.ClassVar[int] = ...
    FINGERPRINT_ERROR_UNABLE_TO_PROCESS: typing.ClassVar[int] = ...
    FINGERPRINT_ERROR_USER_CANCELED: typing.ClassVar[int] = ...
    FINGERPRINT_ERROR_VENDOR: typing.ClassVar[int] = ...
    def authenticate(self, crypto: FingerprintManager.CryptoObject, cancel: android.os.CancellationSignal, flags: int | java.jint | java.lang.Integer, callback: FingerprintManager.AuthenticationCallback, handler: android.os.Handler, /) -> None: ...
    def hasEnrolledFingerprints(self) -> bool: ...
    def isHardwareDetected(self) -> bool: ...

    class CryptoObject(java.lang.Object):
        @typing.overload
        def __init__(self, signature: java.security.Signature, /) -> None: ...
        @typing.overload
        def __init__(self, cipher: javax.crypto.Cipher, /) -> None: ...
        @typing.overload
        def __init__(self, mac: javax.crypto.Mac, /) -> None: ...
        def getCipher(self) -> javax.crypto.Cipher: ...
        def getMac(self) -> javax.crypto.Mac: ...
        def getSignature(self) -> java.security.Signature: ...

    class AuthenticationResult(java.lang.Object):
        def getCryptoObject(self) -> FingerprintManager.CryptoObject: ...

    class AuthenticationCallback(java.lang.Object):
        def __init__(self) -> None: ...
        def onAuthenticationError(self, errorCode: int | java.jint | java.lang.Integer, errString: java.lang.CharSequence, /) -> None: ...
        def onAuthenticationFailed(self) -> None: ...
        def onAuthenticationHelp(self, helpCode: int | java.jint | java.lang.Integer, helpString: java.lang.CharSequence, /) -> None: ...
        def onAuthenticationSucceeded(self, result: FingerprintManager.AuthenticationResult, /) -> None: ...
