![github-actions[bot]](/assets/img/avatar_default.png)
* Create rule S6293 * init rspec s6293 * improve description and add java subtask * fixes after review Co-authored-by: eric-therond-sonarsource <eric-therond-sonarsource@users.noreply.github.com> Co-authored-by: eric-therond-sonarsource <eric.therond@sonarsource.com>
26 lines
599 B
Plaintext
26 lines
599 B
Plaintext
include::../description.adoc[]
|
|
|
|
== Noncompliant Code Example
|
|
|
|
A ``++CryptoObject++`` is not used during authentication:
|
|
|
|
----
|
|
// ...
|
|
BiometricPrompt biometricPrompt = new BiometricPrompt(activity, executor, callback);
|
|
// ...
|
|
biometricPrompt.authenticate(promptInfo); // Noncompliant
|
|
----
|
|
|
|
== Compliant Solution
|
|
|
|
A ``++CryptoObject++`` is used during authentication:
|
|
|
|
----
|
|
// ...
|
|
BiometricPrompt biometricPrompt = new BiometricPrompt(activity, executor, callback);
|
|
// ...
|
|
biometricPrompt.authenticate(promptInfo, new BiometricPrompt.CryptoObject(cipher)); // Compliant
|
|
|
|
----
|
|
|
|
include::../see.adoc[] |