Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ suspend fun getData(): Result<Data> = withContext(Dispatchers.IO) {
- ALWAYS when fixing lint or test failures prefer to do the minimal amount of changes to fix the issues
- USE single-line commit messages under 50 chars; use conventional commit messages template format: `feat: add something new`
- USE `git diff HEAD sourceFilePath` to diff an uncommitted file against the last commit
- ALWAYS run `git status` to check ALL uncommitted changes after completing any code edits, then provide exactly 3 commit message suggestions covering the ENTIRE uncommitted diff
- NEVER capitalize words in commit messages
- ALWAYS run `git status` to check ALL uncommitted changes after completing any code edits, then reply with 3 commit message suggestions covering the ENTIRE uncommitted diff
- ALWAYS check existing code patterns before implementing new features
- USE existing extensions and utilities rather than creating new ones
- ALWAYS consider applying YAGNI (You Ain't Gonna Need It) principle for new code
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/java/to/bitkit/data/keychain/AndroidKeyStore.kt
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,10 @@ class AndroidKeyStore(
val decryptedDataBytes = cipher.doFinal(actualEncryptedData)
return decryptedDataBytes
}

fun deleteEncryptionKey() {
if (keyStore.containsAlias(alias)) {
keyStore.deleteEntry(alias)
}
}
}
1 change: 1 addition & 0 deletions app/src/main/java/to/bitkit/data/keychain/Keychain.kt
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class Keychain @Inject constructor(
suspend fun wipe() {
val keys = snapshot.asMap().keys
keychain.edit { it.clear() }
keyStore.deleteEncryptionKey()

Logger.info("Deleted all keychain entries: ${keys.joinToString()}")
}
Expand Down
Loading