# Print output for @column tags ?>
public
static
final
class
BiometricPrompt.CryptoObject
extends Object
java.lang.Object | |
↳ | android.hardware.biometrics.BiometricPrompt.CryptoObject |
A wrapper class for the cryptographic operations supported by BiometricPrompt.
Currently the framework supports Signature
, Cipher
, Mac
, and
IdentityCredential
.
Cryptographic operations in Android can be split into two categories: auth-per-use and
time-based. This is specified during key creation via the timeout parameter of the
setUserAuthenticationParameters(int, int)
method of KeyGenParameterSpec.Builder
.
CryptoObjects are used to unlock auth-per-use keys via
BiometricPrompt#authenticate(CryptoObject, CancellationSignal, Executor,
AuthenticationCallback)
, whereas time-based keys are unlocked for their specified duration
any time the user authenticates with the specified authenticators (e.g. unlocking keyguard).
If a time-based key is not available for use (i.e. none of the allowed authenticators have
been unlocked recently), applications can prompt the user to authenticate via
BiometricPrompt#authenticate(CancellationSignal, Executor, AuthenticationCallback)
Public constructors | |
---|---|
CryptoObject(Signature signature)
|
|
CryptoObject(Cipher cipher)
|
|
CryptoObject(Mac mac)
|
|
CryptoObject(IdentityCredential credential)
|
Public methods | |
---|---|
Cipher
|
getCipher()
Get |
IdentityCredential
|
getIdentityCredential()
Get |
Mac
|
getMac()
Get |
Signature
|
getSignature()
Get |
Inherited methods | |
---|---|
public CryptoObject (Signature signature)
Parameters | |
---|---|
signature |
Signature : This value cannot be null . |
public CryptoObject (Cipher cipher)
Parameters | |
---|---|
cipher |
Cipher : This value cannot be null . |
public CryptoObject (IdentityCredential credential)
Parameters | |
---|---|
credential |
IdentityCredential : This value cannot be null . |
public Cipher getCipher ()
Get Cipher
object.
Returns | |
---|---|
Cipher |
Cipher object or null if this doesn't contain one. |
public IdentityCredential getIdentityCredential ()
Get IdentityCredential
object.
Returns | |
---|---|
IdentityCredential |
IdentityCredential object or null if this doesn't contain one. |