code: public boolean requireAuthentication(@NonNull Activity activity, @IntRange(from = 1, to = 255) int requestCode, @Nullable String title, @Nullable String description) {
          if (requestCode < 1 || requestCode > 255) {
              throw new IllegalArgumentException("Request code must be a value between 1 and 255.");
          }
          KeyguardManager kManager = (KeyguardManager) activity.getSystemService(Context.KEYGUARD_SERVICE);
          this.authIntent = Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP ? kManager.createConfirmDeviceCredentialIntent(title, description) : null;
          this.authenticateBeforeDecrypt = ((Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && kManager.isDeviceSecure())
                  || (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && kManager.isKeyguardSecure()))
                  && authIntent != null;
          if (authenticateBeforeDecrypt) {
              this.activity = activity;
              this.authenticationRequestCode = requestCode;
          }
          return authenticateBeforeDecrypt;
      }
docs: Require the user to authenticate using the configured LockScreen before accessing the credentials.
  This feature is disabled by default and will only work if the device is running on Android version 21 or up and if the user
  has configured a secure LockScreen (PIN, Pattern, Password or Fingerprint).
  <p>
  The activity passed as first argument here must override the {@link Activity#onActivityResult(int, int, Intent)} method and
  call {@link SecureCredentialsManager#checkAuthenticationResult(int, int)} with the received parameters.
  
  @param activity    a valid activity context. Will be used in the authentication request to launch a LockScreen intent.
  @param requestCode the request code to use in the authentication request. Must be a value between 1 and 255.
  @param title       the text to use as title in the authentication screen. Passing null will result in using the OS's default value.
  @param description the text to use as description in the authentication screen. On some Android versions it might not be shown. Passing null will result in using the OS's default value.
  @return whether this device supports requiring authentication or not. This result can be ignored safely.