diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2023-12-25 15:36:01 +0530 |
---|---|---|
committer | Harsh Shandilya <me@msfjarvis.dev> | 2023-12-25 15:36:01 +0530 |
commit | d8f76b33e9ea74eb567a115dd63559f6b27b2fce (patch) | |
tree | 7a54e2d061100edf374204125add9cf3345e296e /crypto/common/src/main | |
parent | 4c09adbe36889b6f4ec784861cbd59c569ed43c7 (diff) |
fix: check if passphrase is necessary before asking for it
Updates #2836
Diffstat (limited to 'crypto/common/src/main')
-rw-r--r-- | crypto/common/src/main/kotlin/app/passwordstore/crypto/CryptoHandler.kt | 6 |
1 files changed, 6 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..20a4d1d9 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,10 @@ 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 encrypted [message] to notify user if a passphrase is necessary to decrypt + * it. + */ + public fun isPassphraseProtected(message: InputStream): Boolean } |