summaryrefslogtreecommitdiff
path: root/crypto/pgpainless
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/pgpainless')
-rw-r--r--crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPDecryptOptions.kt6
-rw-r--r--crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPEncryptOptions.kt6
-rw-r--r--crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPKeyManager.kt6
-rw-r--r--crypto/pgpainless/src/test/kotlin/app/passwordstore/crypto/PGPKeyManagerTest.kt5
4 files changed, 7 insertions, 16 deletions
diff --git a/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPDecryptOptions.kt b/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPDecryptOptions.kt
index 15ce92f0..4596478e 100644
--- a/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPDecryptOptions.kt
+++ b/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPDecryptOptions.kt
@@ -1,10 +1,8 @@
package app.passwordstore.crypto
/** [CryptoOptions] implementation for PGPainless decrypt operations. */
-public class PGPDecryptOptions
-private constructor(
- private val values: Map<String, Boolean>,
-) : CryptoOptions {
+public class PGPDecryptOptions private constructor(private val values: Map<String, Boolean>) :
+ CryptoOptions {
override fun isOptionEnabled(option: String): Boolean {
return values.getOrDefault(option, false)
diff --git a/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPEncryptOptions.kt b/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPEncryptOptions.kt
index 90de6b51..09531b61 100644
--- a/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPEncryptOptions.kt
+++ b/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPEncryptOptions.kt
@@ -1,10 +1,8 @@
package app.passwordstore.crypto
/** [CryptoOptions] implementation for PGPainless encrypt operations. */
-public class PGPEncryptOptions
-private constructor(
- private val values: Map<String, Boolean>,
-) : CryptoOptions {
+public class PGPEncryptOptions private constructor(private val values: Map<String, Boolean>) :
+ CryptoOptions {
internal companion object {
const val ASCII_ARMOR = "ASCII_ARMOR"
diff --git a/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPKeyManager.kt b/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPKeyManager.kt
index 8aa11803..cbaa110d 100644
--- a/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPKeyManager.kt
+++ b/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPKeyManager.kt
@@ -31,10 +31,8 @@ import org.pgpainless.util.selection.userid.SelectUserId
public class PGPKeyManager
@Inject
-constructor(
- filesDir: String,
- private val dispatcher: CoroutineDispatcher,
-) : KeyManager<PGPKey, PGPIdentifier> {
+constructor(filesDir: String, private val dispatcher: CoroutineDispatcher) :
+ KeyManager<PGPKey, PGPIdentifier> {
private val keyDir = File(filesDir, KEY_DIR_NAME)
diff --git a/crypto/pgpainless/src/test/kotlin/app/passwordstore/crypto/PGPKeyManagerTest.kt b/crypto/pgpainless/src/test/kotlin/app/passwordstore/crypto/PGPKeyManagerTest.kt
index d0cc693e..8893d0eb 100644
--- a/crypto/pgpainless/src/test/kotlin/app/passwordstore/crypto/PGPKeyManagerTest.kt
+++ b/crypto/pgpainless/src/test/kotlin/app/passwordstore/crypto/PGPKeyManagerTest.kt
@@ -217,10 +217,7 @@ class PGPKeyManagerTest {
KeyId(-961222705095032109), // Bobby
)
val userIds =
- arrayOf(
- UserId("Alice <owner@example.com>"),
- UserId("Bobby <owner@example.com>"),
- )
+ arrayOf(UserId("Alice <owner@example.com>"), UserId("Bobby <owner@example.com>"))
for (idCollection in arrayOf(longKeyIds, userIds)) {
val alice1 = keyManager.getKeyById(idCollection[0])