Google is committed to advancing racial equity for Black communities. See how.

BiometricPrompt.CryptoObject

public static final class BiometricPrompt.CryptoObject
extends Object

java.lang.Object
   ↳ android.hardware.biometrics.BiometricPrompt.CryptoObject


A wrapper class for the crypto objects supported by BiometricPrompt. Currently the framework supports Signature, Cipher and Mac objects.

Summary

Public constructors

CryptoObject(Signature signature)
CryptoObject(Cipher cipher)
CryptoObject(Mac mac)
CryptoObject(IdentityCredential credential)

Public methods

Cipher getCipher()

Get Cipher object.

IdentityCredential getIdentityCredential()

Get IdentityCredential object.

Mac getMac()

Get Mac object.

Signature getSignature()

Get Signature object.

Inherited methods

Public constructors

CryptoObject

Added in API level 28
public CryptoObject (Signature signature)

Parameters
signature Signature: This value cannot be null.

CryptoObject

Added in API level 28
public CryptoObject (Cipher cipher)

Parameters
cipher Cipher: This value cannot be null.

CryptoObject

Added in API level 28
public CryptoObject (Mac mac)

Parameters
mac Mac: This value cannot be null.

CryptoObject

Added in API level 30
public CryptoObject (IdentityCredential credential)

Parameters
credential IdentityCredential: This value cannot be null.

Public methods

getCipher

Added in API level 28
public Cipher getCipher ()

Get Cipher object.

Returns
Cipher Cipher object or null if this doesn't contain one.

getIdentityCredential

Added in API level 30
public IdentityCredential getIdentityCredential ()

Get IdentityCredential object.

Returns
IdentityCredential IdentityCredential object or null if this doesn't contain one.

getMac

Added in API level 28
public Mac getMac ()

Get Mac object.

Returns
Mac Mac object or null if this doesn't contain one.

getSignature

Added in API level 28
public Signature getSignature ()

Get Signature object.

Returns
Signature Signature object or null if this doesn't contain one.