Conversation
…hout biometric hardware.
codingjeremy
left a comment
There was a problem hiding this comment.
Just some minor nits. Otherwise, LGTM.
| } | ||
| }; | ||
| dataManager = new EncryptionManager(getApplicationContext(), biometricSupport); | ||
| dataManager = new EncryptionManager(getApplicationContext(), |
There was a problem hiding this comment.
Move first arg to separate line to match other args.
| testDataString.getBytes(), | ||
| (byte[] encryptedData) -> { | ||
| SecureCipher secureCipher = SecureCipher.getDefault(biometricSupport); | ||
| SecureCipher secureCipher = SecureCipher.getDefault( |
There was a problem hiding this comment.
Can this be one line? If not, leave as is.
| private SecureConfig secureConfig; | ||
|
|
||
| public EncryptionManager(Context context, BiometricSupport biometricSupport) { | ||
| public EncryptionManager(Context context, |
There was a problem hiding this comment.
Can you move this to new line? Arguments below don't look like they follow right spacing?
| .then(sdpFailureTestWorker) | ||
| .enqueue(); | ||
| OneTimeWorkRequest sdpTestWorker; | ||
| if(useDeviceCredentialCheckBox.isChecked()) { |
There was a problem hiding this comment.
space after if to follow guidelines
|
|
||
| WorkContinuation workContinuation = | ||
| WorkManager.getInstance(getApplicationContext()).beginWith(sdpTestWorker); | ||
| if(testNoAuthCheckBox.isChecked()) { |
There was a problem hiding this comment.
space after if to follow guidelines
|
|
||
| @Override | ||
| public void onAuthenticationFailed() { | ||
| TestUtil.logFailure(getClass(), |
| @Override | ||
| public void onAuthenticationSucceeded() { | ||
| TestUtil.logSuccess(getClass(), "SDP Device Credential Unlock " + | ||
| "Succeeded, private key available for decryption through the " + |
There was a problem hiding this comment.
Is this indentation right? Makes it seems like an argument even though it is a continuation of argument 2... what happens on AS when you hit enter?
If that default, then ignore this comment.
| public void onAuthenticationFailed() { | ||
| TestUtil.logFailure(getClass(), | ||
| "SDP Device Credential Unlock failed, " + | ||
| "file not available for decryption."); |
There was a problem hiding this comment.
As noted earlier, just check indentation... ignore this comment if correct.
| SecureConfig.getStrongDeviceCredentialConfig(biometricSupport); | ||
| secureConfig.setDebugLoggingEnabled(true); | ||
| SecureKeyGenerator keyGenerator = SecureKeyGenerator.getInstance(secureConfig); | ||
| TestUtil.logSuccess(getClass(), "Generated RSA with provider AndroidKeyStore.", |
There was a problem hiding this comment.
Put all arguments on new lines for better readability.
| } else { | ||
| TestUtil.logFailure(getClass(), "Decryption failed"); | ||
| } | ||
|
|
… no copies of keys are made across threads.
…e code path with no lambdas or callbacks involved.
|
Hi Jon, Let me know when you have a chance to address comments and I will look again. Looks like there are some other parts coming in for PR, but I don't think you want me to review yet. I could be wrong. Let me know if I am. :D |
Added the ability to test devices without biometric hardware.