Skip to content

Commit 755b36c

Browse files
committed
Use .setRequestStrongBoxBacked(true)
1 parent 802e5fa commit 755b36c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • app-infrastructure/src/main/java/mobi/lab/hardwarekeybasedencryptedstoragetester/infrastructure/storage

app-infrastructure/src/main/java/mobi/lab/hardwarekeybasedencryptedstoragetester/infrastructure/storage/StorageEncryptedImpl.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ class StorageEncryptedImpl @Inject constructor(private val appContext: Context)
9898
private fun createOrGetMasterKey(): MasterKey {
9999
return MasterKey.Builder(appContext, STORAGE_MASTER_KEY_ALIAS)
100100
.setKeyScheme(MasterKey.KeyScheme.AES256_GCM)
101+
.setRequestStrongBoxBacked(true)
101102
.build()
102103
}
103104

@@ -114,7 +115,7 @@ class StorageEncryptedImpl @Inject constructor(private val appContext: Context)
114115
}
115116

116117
companion object {
117-
const val STORAGE_MASTER_KEY_ALIAS = "_tester_master_key_"
118+
const val STORAGE_MASTER_KEY_ALIAS = "_tester_master_key_1"
118119
const val STORAGE_ID = "mobi.lab.hardwarekeybasedencryptedstoragetester_encrypted"
119120
}
120121
}

0 commit comments

Comments
 (0)