26 lines
594 B
Plaintext
26 lines
594 B
Plaintext
![]() |
include::../description.adoc[]
|
||
|
|
||
|
== Noncompliant Code Example
|
||
|
|
||
|
A ``++CryptoObject++``is not used during authentication:
|
||
|
|
||
|
----
|
||
|
// ...
|
||
|
val biometricPrompt: BiometricPrompt = BiometricPrompt(activity, executor, callback)
|
||
|
// ...
|
||
|
biometricPrompt.authenticate(promptInfo) // Noncompliant
|
||
|
----
|
||
|
|
||
|
== Compliant Solution
|
||
|
|
||
|
A ``++CryptoObject++`` is used during authentication:
|
||
|
|
||
|
----
|
||
|
// ...
|
||
|
val biometricPrompt: BiometricPrompt = BiometricPrompt(activity, executor, callback)
|
||
|
// ...
|
||
|
biometricPrompt.authenticate(promptInfo, BiometricPrompt.CryptoObject(cipher)) // Compliant
|
||
|
|
||
|
----
|
||
|
|
||
|
include::../see.adoc[]
|