Android security implementation Phase 1 finalization part 1

This commit is contained in:
2026-11-03 22:39:32 +02:00
parent 9b0009faef
commit 3ada3c2ce8
15 changed files with 189 additions and 34 deletions
@@ -0,0 +1,14 @@
package studio.daybreak.mail
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Test
class AndroidVaultKeyPolicyTest {
@Test
fun newKeyMayBeCreatedOnlyWhenThereIsNoEncryptedStore() {
assertTrue(AndroidVaultKeyPolicy.shouldCreateKey(hasEncryptedData = false))
assertFalse(AndroidVaultKeyPolicy.shouldCreateKey(hasEncryptedData = true))
assertTrue(AndroidVaultKeyPolicy.MISSING_KEY_MESSAGE.contains("not reset or replaced"))
}
}