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

CryptoObject

open class CryptoObject
kotlin.Any
   ↳ androidx.biometric.BiometricPrompt.CryptoObject

A wrapper class for the crypto objects supported by BiometricPrompt.

Summary

Public constructors
<init>(@NonNull signature: Signature)

Creates a crypto object that wraps the given signature object.

<init>(@NonNull cipher: Cipher)

Creates a crypto object that wraps the given cipher object.

<init>(@NonNull mac: Mac)

Creates a crypto object that wraps the given MAC object.

<init>(@NonNull identityCredential: IdentityCredential)

Creates a crypto object that wraps the given identity credential object.

Public methods
open Cipher?

Gets the cipher object associated with this crypto object.

open IdentityCredential?

Gets the identity credential object associated with this crypto object.

open Mac?

Gets the MAC object associated with this crypto object.

open Signature?

Gets the signature object associated with this crypto object.

Public constructors

<init>

CryptoObject(@NonNull signature: Signature)

Creates a crypto object that wraps the given signature object.

Parameters
signature Signature: The signature to be associated with this crypto object.

<init>

CryptoObject(@NonNull cipher: Cipher)

Creates a crypto object that wraps the given cipher object.

Parameters
cipher Cipher: The cipher to be associated with this crypto object.

<init>

CryptoObject(@NonNull mac: Mac)

Creates a crypto object that wraps the given MAC object.

Parameters
mac Mac: The MAC to be associated with this crypto object.

<init>

CryptoObject(@NonNull identityCredential: IdentityCredential)

Creates a crypto object that wraps the given identity credential object.

Parameters
identityCredential IdentityCredential: The identity credential to be associated with this crypto object.

Public methods

getCipher

@Nullable open fun getCipher(): Cipher?

Gets the cipher object associated with this crypto object.

Return
Cipher? The cipher, or null if none is associated with this object.

getIdentityCredential

@RequiresApi(30) @Nullable open fun getIdentityCredential(): IdentityCredential?

Gets the identity credential object associated with this crypto object.

Return
IdentityCredential? The identity credential, or null if none is associated with this object.

getMac

@Nullable open fun getMac(): Mac?

Gets the MAC object associated with this crypto object.

Return
Mac? The MAC, or null if none is associated with this object.

getSignature

@Nullable open fun getSignature(): Signature?

Gets the signature object associated with this crypto object.

Return
Signature? The signature, or null if none is associated with this object.