aboutsummaryrefslogtreecommitdiff
path: root/crypto/common
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/common')
-rw-r--r--crypto/common/src/main/kotlin/app/passwordstore/crypto/CryptoHandler.kt5
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/common/src/main/kotlin/app/passwordstore/crypto/CryptoHandler.kt b/crypto/common/src/main/kotlin/app/passwordstore/crypto/CryptoHandler.kt
index 898cf058..c823342b 100644
--- a/crypto/common/src/main/kotlin/app/passwordstore/crypto/CryptoHandler.kt
+++ b/crypto/common/src/main/kotlin/app/passwordstore/crypto/CryptoHandler.kt
@@ -41,4 +41,9 @@ public interface CryptoHandler<Key, EncOpts : CryptoOptions, DecryptOpts : Crypt
/** Given a [fileName], return whether this instance can handle it. */
public fun canHandle(fileName: String): Boolean
+
+ /**
+ * Inspects the given [keys] and returns `false` if none of them require a passphrase to decrypt.
+ */
+ public fun isPassphraseProtected(keys: List<Key>): Boolean
}