aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2023-01-26 13:00:13 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2023-01-26 13:00:13 +0530
commit5e0e0a8be20cfe7641c7691fd8caf585f24aa95a (patch)
treeda0185d66298bd8d2c44106e1baabec1c1e79538 /app/src/main
parente17a17a8e840230651cb6f7d9f9d46e252637e77 (diff)
chore(deps): upgrade security-crypto to 1.1.0-alpha04
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/app/passwordstore/util/git/sshj/SshKey.kt20
1 files changed, 7 insertions, 13 deletions
diff --git a/app/src/main/java/app/passwordstore/util/git/sshj/SshKey.kt b/app/src/main/java/app/passwordstore/util/git/sshj/SshKey.kt
index bdced9af..e7f5dd96 100644
--- a/app/src/main/java/app/passwordstore/util/git/sshj/SshKey.kt
+++ b/app/src/main/java/app/passwordstore/util/git/sshj/SshKey.kt
@@ -232,18 +232,15 @@ object SshKey {
type = if (isGenerated) Type.LegacyGenerated else Type.Imported
}
- @Suppress("BlockingMethodInNonBlockingContext")
private suspend fun getOrCreateWrappingMasterKey(requireAuthentication: Boolean) =
withContext(Dispatchers.IO) {
- MasterKey.Builder(context, KEYSTORE_ALIAS).run {
- setKeyScheme(MasterKey.KeyScheme.AES256_GCM)
- setRequestStrongBoxBacked(true)
- setUserAuthenticationRequired(requireAuthentication, 15)
- build()
- }
+ MasterKey.Builder(context, KEYSTORE_ALIAS)
+ .setKeyScheme(MasterKey.KeyScheme.AES256_GCM)
+ .setRequestStrongBoxBacked(true)
+ .setUserAuthenticationRequired(requireAuthentication, 15)
+ .build()
}
- @Suppress("BlockingMethodInNonBlockingContext")
private suspend fun getOrCreateWrappedPrivateKeyFile(requireAuthentication: Boolean) =
withContext(Dispatchers.IO) {
EncryptedFile.Builder(
@@ -252,13 +249,10 @@ object SshKey {
getOrCreateWrappingMasterKey(requireAuthentication),
EncryptedFile.FileEncryptionScheme.AES256_GCM_HKDF_4KB
)
- .run {
- setKeysetPrefName(ANDROIDX_SECURITY_KEYSET_PREF_NAME)
- build()
- }
+ .setKeysetPrefName(ANDROIDX_SECURITY_KEYSET_PREF_NAME)
+ .build()
}
- @Suppress("BlockingMethodInNonBlockingContext")
suspend fun generateKeystoreWrappedEd25519Key(requireAuthentication: Boolean) =
withContext(Dispatchers.IO) {
delete()