aboutsummaryrefslogtreecommitdiff
path: root/crypto-common/src
diff options
context:
space:
mode:
Diffstat (limited to 'crypto-common/src')
-rw-r--r--crypto-common/src/main/kotlin/app/passwordstore/crypto/CryptoHandler.kt3
1 files changed, 2 insertions, 1 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 ea42af6d..7f5ca625 100644
--- a/crypto-common/src/main/kotlin/app/passwordstore/crypto/CryptoHandler.kt
+++ b/crypto-common/src/main/kotlin/app/passwordstore/crypto/CryptoHandler.kt
@@ -11,7 +11,7 @@ import java.io.InputStream
import java.io.OutputStream
/** Generic interface to implement cryptographic operations on top of. */
-public interface CryptoHandler<Key> {
+public interface CryptoHandler<Key, EncryptedSessionKey, DecryptedSessionKey> {
/**
* Decrypt the given [ciphertextStream] using a set of potential [keys] and [passphrase], and
@@ -24,6 +24,7 @@ public interface CryptoHandler<Key> {
passphrase: String,
ciphertextStream: InputStream,
outputStream: OutputStream,
+ onDecryptSessionKey: (EncryptedSessionKey) -> DecryptedSessionKey,
): Result<Unit, CryptoHandlerException>
/**