diff options
author | Tad Fisher <tadfisher@gmail.com> | 2022-10-09 16:10:42 -0700 |
---|---|---|
committer | Tad Fisher <tadfisher@gmail.com> | 2022-10-09 16:17:20 -0700 |
commit | 75040136ae5ca6108335975430b411f8a560d0ba (patch) | |
tree | 05fe8daf46eee5ec300d6f15f681867f81b4b09d /crypto-common | |
parent | 4b7457c7f712b92f21604d8612ec8ff19df75c81 (diff) |
Add decryption callback to CryptoHandler
Diffstat (limited to 'crypto-common')
-rw-r--r-- | crypto-common/src/main/kotlin/app/passwordstore/crypto/CryptoHandler.kt | 3 |
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> /** |