aboutsummaryrefslogtreecommitdiff
path: root/crypto-common/src/main/kotlin/dev/msfjarvis
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2022-01-09 16:19:52 +0530
committerGitHub <noreply@github.com>2022-01-09 16:19:52 +0530
commit799f1393e49955d05f68b81af26d6cfaf9beadfd (patch)
treee1da29f5c1b3807016bea5f2f1d7046e92529e53 /crypto-common/src/main/kotlin/dev/msfjarvis
parentccb33af854132f1b35b71393ff68d24850de6960 (diff)
Make CryptoHandler use Key as the abstraction layer (#1651)
Diffstat (limited to 'crypto-common/src/main/kotlin/dev/msfjarvis')
-rw-r--r--crypto-common/src/main/kotlin/dev/msfjarvis/aps/crypto/CryptoHandler.kt12
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto-common/src/main/kotlin/dev/msfjarvis/aps/crypto/CryptoHandler.kt b/crypto-common/src/main/kotlin/dev/msfjarvis/aps/crypto/CryptoHandler.kt
index c64e9c9b..eb04ee7a 100644
--- a/crypto-common/src/main/kotlin/dev/msfjarvis/aps/crypto/CryptoHandler.kt
+++ b/crypto-common/src/main/kotlin/dev/msfjarvis/aps/crypto/CryptoHandler.kt
@@ -12,22 +12,22 @@ import java.io.OutputStream
public interface CryptoHandler {
/**
- * Decrypt the given [ciphertextStream] using a [privateKey] and [password], and writes the
+ * Decrypt the given [ciphertextStream] using a [privateKey] and [passphrase], and writes the
* resultant plaintext to [outputStream].
*/
public fun decrypt(
- privateKey: String,
- password: String,
+ privateKey: Key,
+ passphrase: String,
ciphertextStream: InputStream,
outputStream: OutputStream,
)
/**
- * Encrypt the given [plaintextStream] to the provided [pubKeys], and writes the encrypted
- * ciphertext to [outputStream].
+ * Encrypt the given [plaintextStream] to the provided [keys], and writes the encrypted ciphertext
+ * to [outputStream].
*/
public fun encrypt(
- pubKeys: List<String>,
+ keys: List<Key>,
plaintextStream: InputStream,
outputStream: OutputStream,
)