File tree Expand file tree Collapse file tree
app/src/main/java/to/bitkit/data/keychain Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,4 +80,10 @@ class AndroidKeyStore(
8080 val decryptedDataBytes = cipher.doFinal(actualEncryptedData)
8181 return decryptedDataBytes
8282 }
83+
84+ fun deleteEncryptionKey () {
85+ if (keyStore.containsAlias(alias)) {
86+ keyStore.deleteEntry(alias)
87+ }
88+ }
8389}
Original file line number Diff line number Diff line change @@ -96,8 +96,10 @@ class Keychain @Inject constructor(
9696 suspend fun wipe () {
9797 val keys = snapshot.asMap().keys
9898 keychain.edit { it.clear() }
99+ keyStore.deleteEncryptionKey()
100+ val count = keys.size
99101
100- Logger .info(" Deleted all keychain entries: ${keys.joinToString()} " )
102+ Logger .info(" Deleted keychain encryption key and all ' $count ' entries " )
101103 }
102104
103105 private val String .indexed: Preferences .Key <String >
You can’t perform that action at this time.
0 commit comments