summaryrefslogtreecommitdiff
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/KeyManager.kt3
-rw-r--r--crypto-common/src/main/kotlin/app/passwordstore/crypto/errors/CryptoException.kt3
2 files changed, 3 insertions, 3 deletions
diff --git a/crypto-common/src/main/kotlin/app/passwordstore/crypto/KeyManager.kt b/crypto-common/src/main/kotlin/app/passwordstore/crypto/KeyManager.kt
index cb3df75e..c9db3734 100644
--- a/crypto-common/src/main/kotlin/app/passwordstore/crypto/KeyManager.kt
+++ b/crypto-common/src/main/kotlin/app/passwordstore/crypto/KeyManager.kt
@@ -38,7 +38,4 @@ public interface KeyManager<Key, KeyIdentifier> {
* as an identifier for the cryptographic identity tied to this key.
*/
public suspend fun getKeyId(key: Key): KeyIdentifier?
-
- /** Given a [fileName], return whether this instance can handle it. */
- public fun canHandle(fileName: String): Boolean
}
diff --git a/crypto-common/src/main/kotlin/app/passwordstore/crypto/errors/CryptoException.kt b/crypto-common/src/main/kotlin/app/passwordstore/crypto/errors/CryptoException.kt
index cb8980bd..6d752964 100644
--- a/crypto-common/src/main/kotlin/app/passwordstore/crypto/errors/CryptoException.kt
+++ b/crypto-common/src/main/kotlin/app/passwordstore/crypto/errors/CryptoException.kt
@@ -37,5 +37,8 @@ public sealed class CryptoHandlerException(message: String? = null, cause: Throw
/** The passphrase provided for decryption was incorrect. */
public class IncorrectPassphraseException(cause: Throwable) : CryptoHandlerException(null, cause)
+/** No keys were passed to the encrypt/decrypt operation. */
+public object NoKeysProvidedException : CryptoHandlerException(null, null)
+
/** An unexpected error that cannot be mapped to a known type. */
public class UnknownError(cause: Throwable) : CryptoHandlerException(null, cause)