hwsecurity / de.cotech.hw.secrets / AndroidPreferenceSimplePinProvider /

AndroidPreferenceSimplePinProvider

open class AndroidPreferenceSimplePinProvider : PinProvider

A simple, SharedPreferences based PinProvider that implicitly generates and stores a PIN per security key.

Functions

Name Summary
clearPairedPin

open fun clearPairedPin(securityKeyIdentifier: Array<Byte>)

Clears a paired PIN from the stored SharedPreferences.

getInstance

open fun getInstance(context: Context): AndroidPreferenceSimplePinProvider

Creates an instance of this class, using the default filename “paired_pin.prefs”.

open fun getInstance(context: Context, prefsFilename: String): AndroidPreferenceSimplePinProvider

Creates an instance of this class.

getPin

open fun getPin(securityKeyIdentifier: Array<Byte>): ByteSecret

Returns a PIN for the security key identified by the given AID.

abstract fun getPin(securityKeyAid: Array<Byte>): ByteSecret

Returns a PIN for the security key identified by the given AID.The requirements for this PIN depend on the security key, but typically can be at least any sequenceof six or more alphanumeric characters.

getPuk

open fun getPuk(securityKeyAid: Array<Byte>): ByteSecret

Returns a PUK for the security key identified by the given AID.The requirements for this PUK depend on the security key, but typically can be at least any sequenceof eight or more alphanumeric characters.