Skip to content

Commit

Permalink
Rename key alias
Browse files Browse the repository at this point in the history
  • Loading branch information
avazirna committed Dec 13, 2023
1 parent 26f6e1f commit 5c6f8fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/src/org/commcare/CommCareApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
import okhttp3.MultipartBody;
import okhttp3.RequestBody;

import static org.commcare.util.EncryptionUtils.USER_CREDENTIALS_KEY_ALIAS;
import static org.commcare.util.EncryptionUtils.CC_IN_MEMORY_ENCRYPTION_KEY_ALIAS;
import static org.commcare.util.EncryptionUtils.getEncryptionKeyProvider;

public class CommCareApplication extends MultiDexApplication {
Expand Down Expand Up @@ -231,7 +231,7 @@ public void onCreate() {
setRoots();
prepareTemporaryStorage();

getEncryptionKeyProvider().generateCryptographicKeyInKeyStore(USER_CREDENTIALS_KEY_ALIAS);
getEncryptionKeyProvider().generateCryptographicKeyInKeyStore(CC_IN_MEMORY_ENCRYPTION_KEY_ALIAS);

if (LegacyInstallUtils.checkForLegacyInstall(this)) {
dbState = STATE_LEGACY_DETECTED;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public class EncryptCredentialsInMemoryTest {

private fun generateUserCredentialKey() {
val mockKeyGenParameterSpec = mockk<KeyGenParameterSpec>()
every { mockKeyGenParameterSpec.keystoreAlias } returns EncryptionUtils.USER_CREDENTIALS_KEY_ALIAS
every { mockKeyGenParameterSpec.keystoreAlias } returns EncryptionUtils.CC_IN_MEMORY_ENCRYPTION_KEY_ALIAS

// generate key using mock key generator
val mockKeyGenerator = MockKeyGenerator()
Expand Down

0 comments on commit 5c6f8fd

Please sign in to comment.